aboutsummaryrefslogtreecommitdiff
path: root/libbutl/char-scanner.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-02-26 11:47:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-02-26 11:47:01 +0200
commit628cc222d71e9f12049b85807d51f3c766db5be0 (patch)
tree0f6d649fed9fa110b6347f6e8bf0d83bc10020f6 /libbutl/char-scanner.cxx
parent3b1ce034f9bb01b6c6f4e1a74884f89ef07a9b44 (diff)
Skip multiple CR in CRLF sequence in char_scanner
Diffstat (limited to 'libbutl/char-scanner.cxx')
-rw-r--r--libbutl/char-scanner.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/libbutl/char-scanner.cxx b/libbutl/char-scanner.cxx
index 607d887..cebad61 100644
--- a/libbutl/char-scanner.cxx
+++ b/libbutl/char-scanner.cxx
@@ -64,8 +64,13 @@ namespace butl
eos_ = true;
else if (crlf_ && v == '\r')
{
- get_ ();
- int_type v1 (peek_ ());
+ int_type v1;
+ do
+ {
+ get_ ();
+ v1 = peek_ ();
+ }
+ while (v1 == '\r');
if (v1 != '\n')
{