diff --git a/core/imgread/gdi.cpp b/core/imgread/gdi.cpp index 2cc246c78..902ad66bc 100644 --- a/core/imgread/gdi.cpp +++ b/core/imgread/gdi.cpp @@ -113,12 +113,14 @@ Disc* load_gdi(const char* file) if (last == '"') { + gdi >> std::noskipws; for(;;) { - gdi >> std::noskipws >> last; + gdi >> last; if (last == '"') break; track_filename += last; } + gdi >> std::skipws; } else { diff --git a/tests/files/test_gdis/d/cs (0,1).bin b/tests/files/test_gdis/d/cs (0,1).bin new file mode 100644 index 000000000..e69de29bb diff --git a/tests/files/test_gdis/d/cs.gdi b/tests/files/test_gdis/d/cs.gdi new file mode 100644 index 000000000..a0603d98a --- /dev/null +++ b/tests/files/test_gdis/d/cs.gdi @@ -0,0 +1,4 @@ +3 +1 0 4 2352 "cs (0,1).bin" 0 +2 450 0 2352 cs02.raw 0 +3 45000 4 2352 cs03.bin 0 diff --git a/tests/files/test_gdis/d/cs02.raw b/tests/files/test_gdis/d/cs02.raw new file mode 100644 index 000000000..e69de29bb diff --git a/tests/files/test_gdis/d/cs03.bin b/tests/files/test_gdis/d/cs03.bin new file mode 100644 index 000000000..e69de29bb