diff --git a/source/sw/src/jnstub.cpp b/source/sw/src/jnstub.cpp index 198fd1085..e96c3bdec 100644 --- a/source/sw/src/jnstub.cpp +++ b/source/sw/src/jnstub.cpp @@ -2282,7 +2282,7 @@ ExtGetSpriteCaption(short spritenum) { SPRITEp sp = &sprite[spritenum]; const char *p = ""; - char name[64]; + char name[66]; char tp[30]; char multi_str[30] = ""; int16_t data; diff --git a/source/sw/src/sounds.cpp b/source/sw/src/sounds.cpp index 8bc54ee76..9a5e2b4c9 100644 --- a/source/sw/src/sounds.cpp +++ b/source/sw/src/sounds.cpp @@ -469,7 +469,7 @@ PlaySong(char *song_file_name, int cdaudio_track, SWBOOL loop, SWBOOL restart) for (i = 0; i < ARRAY_SIZE(tracktypes); ++i) { waveformtrack[tracknamebaselen] = '\0'; - Bstrncat(waveformtrack, tracktypes[i], MAXWAVEFORMTRACKLENGTH); + Bstrncat(waveformtrack, tracktypes[i], MAXWAVEFORMTRACKLENGTH - 1); if (LoadSong(waveformtrack)) {