buffer optimization: long comments do not trigger errorBufferTooSmall#6
buffer optimization: long comments do not trigger errorBufferTooSmall#6dzzie wants to merge 1 commit intostevemarple:masterfrom dzzie:master
Conversation
|
actually one note on this, the prototype should be moved to the private: section of the .h its not for public consumption as it expects that a read of len has already occured |
|
It fails the regression test. Values which are expected to be read from test.ini are not found. Below is the diff that (Lines beginning with "-" are the reference output, lines which begin with "+" are from the current output.) |
|
sorry I just realized i had a bug in this on the way home from the grocery store, one sec |
|
ok I amended the commit, I realized I needed to scan the existing buffer for \n before scanning ahead, I was testing on a truncated ini, this time I ran it through the full set sorry |
|
That looks good, it passes the regression tests now. I noticed that I haven't made the library available for automatic installation via the IDE. I plan to update my master copy and submit for inclusion on the lists of third-party libraries. Then I'll merge your changes and push an updated version. That way users can revert if necessary. |
|
one other thought I just had...I wonder if I need to pass the i counter into the readUntilNewLine function and start from there in the for loop instead of i=0, since the buffer has already been partially processed and pos++ that many times already. nothing showed up in the tests, but I will see if I can construct one. Simple as the logic seems Its kind of tricky to nail down just right :-\ edit: I cant seem to construct a scenario that bugs it out, the change didnt hurt anything either. The data i thought that might trigger it would have been a comment line with space preceeding the comment char, followed immediately by setting. |
this should do the trick give it a try.