Andrew Boyson / web

Dependents:   oldheating gps motorhome heating

Revision:
11:84121d7b47e9
Parent:
2:14de8c14afd9
Child:
12:237a0f75b4d0
diff -r 11a2414cd295 -r 84121d7b47e9 page.c
--- a/page.c	Sat Nov 17 17:19:28 2018 +0000
+++ b/page.c	Sat Nov 17 17:46:30 2018 +0000
@@ -116,7 +116,7 @@
 void PageAddLabelledInt(char* label, float labelwidth, int value)
 {
     char text[30];
-    snprintf(text, sizeof(text), "%d", value);
+    snprintf(text, sizeof(text), "%8d", value); //Right align with enough spaces so that the length is always constant. 
     PageAddLabelledValue(label, labelwidth, text);
 }
 void PageAddTextInput(char* action, float width, char* label, float labelwidth, char* name, float inputwidth, char* value)