changeset 979:e7cd7ffd1879 Evo_2_23

Add proper string termination and fix space. (mikeller)
author heinrichsweikamp
date Tue, 04 Feb 2025 13:48:53 +0100 (5 weeks ago)
parents 57b82ae99969
children 7149f372b0ba
files Discovery/Src/t7.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/t7.c	Thu Jan 30 21:26:38 2025 +0100
+++ b/Discovery/Src/t7.c	Tue Feb 04 13:48:53 2025 +0100
@@ -2981,13 +2981,15 @@
         if (isLoopMode(stateUsed->diveSettings.diveMode)) {
             textPointer = snprintf(TextR1, TEXTSIZE, "\a\001 %c%c ", TXT_2BYTE, TXT2BYTE_BailoutShort);
             textPointer += tHome_gas_writer(stateUsed->diveSettings.gas[actualBetterBailoutGasId()].oxygen_percentage, stateUsed->diveSettings.gas[actualBetterBailoutGasId()].helium_percentage, &TextR1[textPointer]);
+            TextR1[textPointer++] = '?';
             TextR1[textPointer++] = ' ';
-            TextR1[textPointer++] = '?';
+            TextR1[textPointer++] = 0;
         } else {
             textPointer = snprintf(TextR1, TEXTSIZE, "\a\001 %c%c %01.2f/", TXT_2BYTE, TXT2BYTE_LoopShort, stateUsed->diveSettings.setpoint[actualBetterSetpointId()].setpoint_cbar / 100.0);
             textPointer += tHome_gas_writer(stateUsed->diveSettings.gas[stateUsed->lifeData.lastDiluent_GasIdInSettings].oxygen_percentage, stateUsed->diveSettings.gas[stateUsed->lifeData.lastDiluent_GasIdInSettings].helium_percentage, &TextR1[textPointer]);
+            TextR1[textPointer++] = '?';
             TextR1[textPointer++] = ' ';
-            TextR1[textPointer++] = '?';
+            TextR1[textPointer++] = 0;
         }
 
         GFX_write_string_color(&FontT48, &t7c2, TextR1, 0, CLUT_WarningYellow);
@@ -4921,6 +4923,7 @@
 	}
 	return color;
 }
+
 void t7_tick(void)
 {
     SSettings *settings = settingsGetPointer();