Skip to content

Commit

Permalink
ini.cpp: Fix empty \r\n line parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Nov 9, 2024
1 parent 1892f6a commit d8dde8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/utils/ini.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ tl::expected<Ini, std::string> Ini::parse(std::string_view buffer)
nextLineBegin = eof;
} else {
nextLineBegin = lineEnd + 1;
if (lineBegin + 1 < lineEnd && *(lineEnd - 1) == '\r') --lineEnd;
if (lineBegin + 1 <= lineEnd && *(lineEnd - 1) == '\r') --lineEnd;
}
const char *keyBegin = SkipLeadingWhitespace(lineBegin, lineEnd);
if (keyBegin == lineEnd) continue;
Expand Down

0 comments on commit d8dde8d

Please sign in to comment.