mirror of
https://github.com/minetest/minetest.git
synced 2025-02-17 02:22:26 +01:00
override.txt: Fix crash due to CRLF endings (#8439)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user