comparison Discovery/Src/t7.c @ 631:49a662df8210

Warnings: Solved warnings related to possible problems with string length in combination with sprintf usage
author Ideenmodellierer
date Tue, 23 Feb 2021 21:55:26 +0100
parents fd0b60dee6f3
children c737cf5d9067
comparison
equal deleted inserted replaced
630:b9d4baa4f6fa 631:49a662df8210
1870 helium = pGasLine[gasId].helium_percentage; 1870 helium = pGasLine[gasId].helium_percentage;
1871 textpointer += write_gas(&text[textpointer], oxygen, helium); 1871 textpointer += write_gas(&text[textpointer], oxygen, helium);
1872 // Wechseltiefe 1872 // Wechseltiefe
1873 if(pGasLine[gasId].depth_meter) 1873 if(pGasLine[gasId].depth_meter)
1874 { 1874 {
1875 textpointer += snprintf(&text[textpointer],7,"\t%u %c%c",unit_depth_integer(pGasLine[gasId].depth_meter), unit_depth_char1(), unit_depth_char2()); 1875 textpointer += snprintf(&text[textpointer],10,"\t%u %c%c",unit_depth_integer(pGasLine[gasId].depth_meter), unit_depth_char1(), unit_depth_char2());
1876 } 1876 }
1877 GFX_write_string(&FontT42, &t7cY0free, text, gasId); 1877 GFX_write_string(&FontT42, &t7cY0free, text, gasId);
1878 #ifdef ENABLE_UNUSED_GAS_HIDING 1878 #ifdef ENABLE_UNUSED_GAS_HIDING
1879 } 1879 }
1880 #endif 1880 #endif