Closed biappi closed 8 years ago
Many many thanks biappi for these contributions. They are all very valuable.
I will see if I get the time to fix this bug in the "right" way. So right now I won't merge but use your patch as a problem description. I think when I was adding the saving feature that I had trouble with files and I never had time to test more thoroughly, not really remembering but it may very well have been this size check that was wrong all along. Thanks!
i had troubles sending files greater than 255 bytes from the commodore64 to the arduino. the problem was caused by an always true comparison because sizeof(serCmdIOBuf) is MAX_BYTES_PER_REQUEST, aka 256, but bytesInBuffer can hold only 255, so the cycle guard will collapse into an always-true comparison.
artificially limiting the "packet" size to 0xf0 worked for my toy example. of course this is only a workaround, but it can be a starting point for a better patch.