fixed a rare parsing bug where too many tokens would be detected if the staging buffer was broken directly before the second quotation mark in a key string
fixed a rare parsing bug where too many tokens would be detected if the staging buffer was broken directly before the second quotation mark in a key string
1.1 --- a/core/TextParsers.cpp Tue Nov 27 02:19:39 2007 +0000
1.2 +++ b/core/TextParsers.cpp Tue Nov 27 17:25:16 2007 +0000
1.3 @@ -408,8 +408,8 @@
1.4 {
1.5 if (in_quote)
1.6 {
1.7 - /* If i was 0, this case is impossible due to reparsing */
1.8 - if ((i != 0) && c == '"' && parse_point[i-1] != '\\')
1.9 + /* If i was 0, we could have reparsed, so make sure there's no buffer underrun */
1.10 + if ((&parse_point[i] != in_buf) && c == '"' && parse_point[i-1] != '\\')
1.11 {
1.12 /* If we reached a quote in an ignore phase,
1.13 * we're staging a string and we must rotate it out.