diff Discovery/Src/tMenuEditCustom.c @ 630:b9d4baa4f6fa

Warnings: Solved warnings related to possible problems with string length in combination with sprintf usage
author Ideenmodellierer
date Tue, 23 Feb 2021 21:54:56 +0100
parents 3e1a0e267f38
children f735f1123526
line wrap: on
line diff
--- 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;