Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/src/parsing.c b/src/parsing.c 2index 8d97a7e..786a536 100644 3--- a/src/parsing.c 4+++ b/src/parsing.c 5@@ -348,8 +348,8 @@ void io_getLevels(level** ls, char* fn){ 6 memset(io_cs, 0, sizeof(color) * CHAR_MAX); 7 *ls = salloc(sizeof(level) * CHAR_MAX); 8 memset(*ls, 0, sizeof(level *) * CHAR_MAX); 9- char c; 10- char name = '\0'; 11+ int c; 12+ int name = '\0'; 13 while((c = fgetc(f)) != EOF){ 14 if (c == 'C' || c == 'O' || c == 'L') { 15 name = fgetc(f); 16diff --git a/src/parsing.h b/src/parsing.h 17index d4be0a0..ae485ae 100644 18--- a/src/parsing.h 19+++ b/src/parsing.h 20@@ -16,9 +16,9 @@ int io_getFont(bool**, char*); 21 22 void io_getColor(FILE*, color*); 23 24-void io_getLevel(FILE*, level*, obj[127]); 25+void io_getLevel(FILE*, level*, obj[CHAR_MAX]); 26 27-void io_getObj(FILE*, obj*, char, color[127]); 28+void io_getObj(FILE*, obj*, char, color[CHAR_MAX]); 29 30 // TODO: this is named terribly. There should be another function io_readLevels that's exposed. this should be private and take in FILE* 31 void io_getLevels(level**, char*); 32diff --git a/src/visual_sounds.c b/src/visual_sounds.c 33index 067e2e3..5e5cdc4 100644 34--- a/src/visual_sounds.c 35+++ b/src/visual_sounds.c 36@@ -921,6 +921,9 @@ void vs_mainPlay(int snd) { 37 } 38 39 void vs_mainStop() { 40+ if (vs_mainVisual == SND_none) { 41+ return; 42+ } 43 vs_sounds[vs_mainVisual].cur = NULL; 44 vs_mainVisual = SND_none; 45 }