-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I believe this is actually a continuation of #1, but since it's closed and I don't seem to have a way to reopen it, I'll open up a new issue.
Seems like there is still some problem with the buffering mechanism. When there is an identifier being broken up by buffer ending, it would be read as two separate identifiers causing error.
After investigating seems like I missed something the last time. If I comprehend correctly, EnsureBuffer(len) should return true when there is actually len chars to read (those many of chars can be ensured, like the method name), and false if no further chars are available. However at line 242:
Luaon.NET/Luaon.NET/LuaTableTextReader.cs
Lines 235 to 243 in 146db4e
| var charsRead = Reader.ReadBlock(buffer, bufferLength, charsNeeded); | |
| bufferLength += charsRead; | |
| if (charsRead < charsNeeded) | |
| { | |
| readerEof = true; | |
| return false; | |
| } | |
| return false; | |
| } |
After the if on line 237, a successful state can be assured (there is more char to read). So looks like it should return true instead. I tested locally with the file that I need to parse and seems like it's working.


