You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to read one byte at the end of the buffer with StringReader, V will panic. This is because the StringReader.needs_fill_until and StringReader.needs_fill will return true if the requested length is equal to or greater than the length of the buffer. The buffer should only be filled if the requested length is greater than the length of the buffer, not equal to.
StringReader will read the last byte of the buffer if the length to read requested is equal to the end of the buffer.
Current Behavior
[65, 66, 67, 68]
[65]
[66]
[67]
V panic: result not set (reader is not set)
v hash: a867ed6
print_backtrace_skipping_top_frames is not implemented
Possible Solution
I actually don't understand why the reader object disappears in the fill_buffer functions. Even if the buffer is at the end of the stream and too many bytes are requested, shouldn't it still be there? At any rate, the needs_fill functions should probably be changed to check for only greater than, not greater than or equal to.
Additional Information/Context
No response
V version
V 0.4.4 f789874.a867ed6
Environment details (OS name and version, etc.)
V full version: V 0.4.4 f789874.a867ed6
OS: windows, Microsoft Windows 11 Enterprise v26058 ARM 64-bit Processor
Processor: 8 cpus, 64bit, little endian,
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered:
Describe the bug
When attempting to read one byte at the end of the buffer with StringReader, V will panic. This is because the
StringReader.needs_fill_until
andStringReader.needs_fill
will return true if the requested length is equal to or greater than the length of the buffer. The buffer should only be filled if the requested length is greater than the length of the buffer, not equal to.Reproduction Steps
Expected Behavior
StringReader will read the last byte of the buffer if the length to read requested is equal to the end of the buffer.
Current Behavior
Possible Solution
I actually don't understand why the reader object disappears in the
fill_buffer
functions. Even if the buffer is at the end of the stream and too many bytes are requested, shouldn't it still be there? At any rate, theneeds_fill
functions should probably be changed to check for only greater than, not greater than or equal to.Additional Information/Context
No response
V version
V 0.4.4 f789874.a867ed6
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: