projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
2f5d9ba
)
Ignore carriage returns in INI parsing
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Sat, 16 Apr 2022 22:15:07 +0000 (
00:15
+0200)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Sat, 16 Apr 2022 22:15:07 +0000 (
00:15
+0200)
src/variant.cpp
patch
|
blob
|
history
diff --git
a/src/variant.cpp
b/src/variant.cpp
index
861a1f8
..
5259a41
100644
(file)
--- a/
src/variant.cpp
+++ b/
src/variant.cpp
@@
-1482,6
+1482,8
@@
void VariantMap::parse_istream(std::istream& file) {
Config attribs = {};
while (file.peek() != '[' && std::getline(file, input))
{
+ if (!input.empty() && input.back() == '\r')
+ input.pop_back();
std::stringstream ss(input);
if (ss.peek() != ';' && ss.peek() != '#')
{