projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
627a96c
)
override.txt: Fix crash due to CRLF endings (#8439)
author
David G
<kestral246@gmail.com>
Sat, 25 May 2019 16:01:55 +0000
(18:01 +0200)
committer
SmallJoker
<mk939@ymail.com>
Sat, 25 May 2019 16:01:55 +0000
(18:01 +0200)
src/nodedef.cpp
patch
|
blob
|
history
diff --git
a/src/nodedef.cpp
b/src/nodedef.cpp
index 83e3968c3d3c784a38fb40c534cbca4d9c5339e0..2ffdf2fc2a6ab7e163adac7a7e978fe9055fb159 100644
(file)
--- a/
src/nodedef.cpp
+++ b/
src/nodedef.cpp
@@
-1300,8
+1300,11
@@
void NodeDefManager::applyTextureOverrides(const std::string &override_filepath)
int line_c = 0;
while (std::getline(infile, line)) {
line_c++;
- if (trim(line).empty())
+ // Also trim '\r' on DOS-style files
+ line = trim(line);
+ if (line.empty())
continue;
+
std::vector<std::string> splitted = str_split(line, ' ');
if (splitted.size() != 3) {
errorstream << override_filepath