From 928ff24cbca717ac9b39589874b6e8ec17c236b8 Mon Sep 17 00:00:00 2001 From: sdcb Date: Wed, 5 Apr 2017 17:12:32 +0800 Subject: Fix a infinite skip_comment check in Paragraphs.cpp This happens when git not checkout file's line break as CR-LF. When CONTROL file contains comment followed by \n instead of \r\n, there will be a infinite skip_comment check. --- toolsrc/src/Paragraphs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolsrc/src/Paragraphs.cpp') diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp index 98eb64328..010da6700 100644 --- a/toolsrc/src/Paragraphs.cpp +++ b/toolsrc/src/Paragraphs.cpp @@ -34,7 +34,7 @@ namespace vcpkg::Paragraphs void skip_comment(char& ch) { - while (ch != '\r') + while (ch != '\r' && ch != '\n' && ch != '\0') next(ch); if (ch == '\r') next(ch); -- cgit v1.2.3