Index: base/json/json_parser.cc |
=================================================================== |
--- base/json/json_parser.cc (revision 177738) |
+++ base/json/json_parser.cc (working copy) |
@@ -404,7 +404,9 @@ |
case '\r': |
case '\n': |
index_last_line_ = index_; |
- ++line_number_; |
+ // Don't increment line_number_ twice for "\r\n". |
+ if ( !(*pos_ == '\n' && pos_ > start_pos_ && *(pos_ - 1) == '\r') ) |
Robert Sesek
2013/01/22 18:38:01
nit: no spaces around the condition of an if
Also
|
+ ++line_number_; |
// Fall through. |
case ' ': |
case '\t': |