diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 160174080..5ddb5f726 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -311,10 +311,8 @@ target_compile_options(SRB2SDL2 PRIVATE $<$,8.1.0>: -Wno-error=format-overflow -Wno-error=stringop-truncation - -Wno-error=stringop-overflow -Wno-format-overflow -Wno-stringop-truncation - -Wno-stringop-overflow -Wno-error=multistatement-macros > diff --git a/src/Makefile.d/versions.mk b/src/Makefile.d/versions.mk index b639ad9a1..395bba697 100644 --- a/src/Makefile.d/versions.mk +++ b/src/Makefile.d/versions.mk @@ -136,10 +136,8 @@ endif ifdef GCC81 WFLAGS+=-Wno-error=format-overflow WFLAGS+=-Wno-error=stringop-truncation - WFLAGS+=-Wno-error=stringop-overflow WFLAGS+=-Wno-format-overflow WFLAGS+=-Wno-stringop-truncation - WFLAGS+=-Wno-stringop-overflow WFLAGS+=-Wno-error=multistatement-macros endif diff --git a/src/f_finale.c b/src/f_finale.c index edeb08820..b19e5eb47 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -4384,11 +4384,10 @@ void F_GetPromptPageByNamedTag(const char *tag, INT32 *promptnum, INT32 *pagenum if (!tag || !tag[0]) return; - strncpy(suffixedtag, tag, 33); - suffixedtag[32] = 0; + strncpy(suffixedtag, tag, sizeof(suffixedtag)-1); if (tutorialmode) - suffixed = F_GetTextPromptTutorialTag(suffixedtag, 33); + suffixed = F_GetTextPromptTutorialTag(suffixedtag, sizeof(suffixedtag)-1); for (*promptnum = 0 + tutorialpromptnum; *promptnum < MAX_PROMPTS; (*promptnum)++) {