| #
4271e4a8
|
| 16-Oct-2022 |
Damjan Jovanovic <damjan@apache.org> |
Fix some errors in the scripting module's XInputStreamImpl: - Check the loop termination in readBytes() properly: currently it increments totalBytesRead while also decrementing nBytesToRead, so whe
Fix some errors in the scripting module's XInputStreamImpl: - Check the loop termination in readBytes() properly: currently it increments totalBytesRead while also decrementing nBytesToRead, so when compared to each other, the loop terminates when the buffer is half full. Only check for nBytesToRead instead. - Deal with the possibility of available() returning 0 in readSomeBytes().
Patch by: me
(cherry picked from commit 7e29bacc90c4b1b9788c3b71dfacd17daecde7a7)
show more ...
|