Skip to content
Permalink
Browse files

override.txt: Fix crash due to CRLF endings (#8439)

  • Loading branch information...
kestral246 authored and SmallJoker committed May 25, 2019
1 parent 627a96c commit 40dadecb6ece6c9bbf7739e3a44ace25c0716dec
Showing with 4 additions and 1 deletion.
  1. +4 −1 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

0 comments on commit 40dadec

Please sign in to comment.
You can’t perform that action at this time.