Hitman666 / nbCcTalkCoinAcceptor

This project contains usage instructions and code examples (C#) for communication with coin acceptor using the ccTalk protocol
29 stars 19 forks source link

Get Message Length exception #9

Open xtreampb opened 7 years ago

xtreampb commented 7 years ago

nbCcTalkCoinAcceptor/nbCcTalkCoinAcceptor_VsProject/cctalkLib/Devices/GenericCctalkDevice.cs method on line 304 respondRawData will always be of length 255. MinMessageLength is set to 5 by default. A valid message can be of size 4. The if check should be removed as it doesn't protect from anything and (when constructing from a list List.ToArray() can cause exceptions to be thrown in error.

Hitman666 commented 7 years ago

Hey, thanks for your issue report. Please send your PR and I'll review and merge it to the master branch. Thanks!