forked from Mirrorlandia_minetest/minetest
override.txt: Fix crash due to CRLF endings (#8439)
This commit is contained in:
parent
627a96cd99
commit
40dadecb6e
@ -1300,8 +1300,11 @@ void NodeDefManager::applyTextureOverrides(const std::string &override_filepath)
|
|||||||
int line_c = 0;
|
int line_c = 0;
|
||||||
while (std::getline(infile, line)) {
|
while (std::getline(infile, line)) {
|
||||||
line_c++;
|
line_c++;
|
||||||
if (trim(line).empty())
|
// Also trim '\r' on DOS-style files
|
||||||
|
line = trim(line);
|
||||||
|
if (line.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
std::vector<std::string> splitted = str_split(line, ' ');
|
std::vector<std::string> splitted = str_split(line, ' ');
|
||||||
if (splitted.size() != 3) {
|
if (splitted.size() != 3) {
|
||||||
errorstream << override_filepath
|
errorstream << override_filepath
|
||||||
|
Loading…
Reference in New Issue
Block a user