aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/Paragraphs.cpp
diff options
context:
space:
mode:
authorsdcb <sdflysha@qq.com>2017-04-05 17:12:32 +0800
committersdcb <sdflysha@qq.com>2017-04-05 17:12:32 +0800
commit928ff24cbca717ac9b39589874b6e8ec17c236b8 (patch)
treeb79678aae1a631389365c3b74c6785bc75233d72 /toolsrc/src/Paragraphs.cpp
parentd9a403453904261c6b34c5d33557134b9fe3a8a0 (diff)
downloadvcpkg-928ff24cbca717ac9b39589874b6e8ec17c236b8.tar.gz
vcpkg-928ff24cbca717ac9b39589874b6e8ec17c236b8.zip
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.
Diffstat (limited to 'toolsrc/src/Paragraphs.cpp')
-rw-r--r--toolsrc/src/Paragraphs.cpp2
1 files changed, 1 insertions, 1 deletions
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);