mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-23 05:19:18 -06:00
Fix crash when building Speck cache (closes #2689)
This commit is contained in:
@@ -154,7 +154,7 @@ Dataset loadFile(std::filesystem::path path, SkipAllZeroLines skipAllZeroLines)
|
||||
|
||||
// Guard against wrong line endings (copying files from Windows to Mac) causes
|
||||
// lines to have a final \r
|
||||
if (line.back() == '\r') {
|
||||
if (!line.empty() && line.back() == '\r') {
|
||||
line = line.substr(0, line.length() - 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user