diff options
-rw-r--r-- | games/hyperrogue/files/patch-graph.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/games/hyperrogue/files/patch-graph.cpp b/games/hyperrogue/files/patch-graph.cpp new file mode 100644 index 000000000000..d5049e1401b0 --- /dev/null +++ b/games/hyperrogue/files/patch-graph.cpp @@ -0,0 +1,11 @@ +--- graph.cpp.orig 2016-08-26 16:36:03 UTC ++++ graph.cpp +@@ -5595,7 +5595,7 @@ bool loadMusicInfo(string dir) { + for(int i=0; i<size(dir); i++) if(dir[i] == '/' || dir[i] == '\\') + dir2 = dir.substr(0, i+1); + char buf[1000]; +- while(fgets(buf, 800, f) > 0) { ++ while(fgets(buf, 800, f) != NULL) { + for(int i=0; buf[i]; i++) if(buf[i] == 10 || buf[i] == 13) buf[i] = 0; + if(buf[0] == '[' && buf[3] == ']') { + int id = (buf[1] - '0') * 10 + buf[2] - '0'; |