# HG changeset patch # User Ideenmodellierer # Date 1614113696 -3600 # Node ID b9d4baa4f6fa7159c1f18fd8a69f4e5a1339acff # Parent 55a9aa740f130c1aa9975468e96b1e84183233bf Warnings: Solved warnings related to possible problems with string length in combination with sprintf usage diff -r 55a9aa740f13 -r b9d4baa4f6fa Discovery/Src/tInfoLog.c --- a/Discovery/Src/tInfoLog.c Tue Feb 23 21:53:24 2021 +0100 +++ b/Discovery/Src/tInfoLog.c Tue Feb 23 21:54:56 2021 +0100 @@ -302,7 +302,7 @@ if((*text == 0) && (infolog.maxpages > 1)) { - snprintf(text,8, "\002" "%u/%u", infolog.page, infolog.maxpages); + snprintf(text,10, "\002" "%u/%u", infolog.page, infolog.maxpages); gfx_write_topline_simple(&INFOLOGscreen, text, CLUT_InfoPageLogbook); *text = 0; } diff -r 55a9aa740f13 -r b9d4baa4f6fa Discovery/Src/tMenuCustom.c --- a/Discovery/Src/tMenuCustom.c Tue Feb 23 21:53:24 2021 +0100 +++ b/Discovery/Src/tMenuCustom.c Tue Feb 23 21:54:56 2021 +0100 @@ -84,7 +84,7 @@ break; default: - snprintf(&text[textPointer++],2,"%u",settingsGetPointer()->extraDisplay); + snprintf(&text[textPointer++],4,"%u",settingsGetPointer()->extraDisplay); break; } } diff -r 55a9aa740f13 -r b9d4baa4f6fa Discovery/Src/tMenuEditCustom.c --- a/Discovery/Src/tMenuEditCustom.c Tue Feb 23 21:53:24 2021 +0100 +++ b/Discovery/Src/tMenuEditCustom.c Tue Feb 23 21:54:56 2021 +0100 @@ -170,7 +170,7 @@ text[4] = '-'; break; default: - snprintf(&text[4],2,"%u",settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary); + text[4] = 'X'; break; } text[5] = 0; @@ -294,8 +294,7 @@ text[textIndex++] = TXT2BYTE_MoCtrlScroll; break; default: - snprintf(&text[4],2,"%u",settingsGetPointer()->MotionDetection); - textIndex++; + textIndex += snprintf(&text[4],4,"%u",settingsGetPointer()->MotionDetection); break; } text[textIndex] = 0;