fix warning

This commit is contained in:
MichaelDvP
2025-10-24 09:50:31 +02:00
parent 2405e11af2
commit 49278bdea4

View File

@@ -385,7 +385,7 @@ char * Helpers::render_value(char * result, const uint32_t value, const int8_t f
char * Helpers::render_string(char * result, const char * c, const uint8_t len) { char * Helpers::render_string(char * result, const char * c, const uint8_t len) {
char * p = result; char * p = result;
while (*c != '\0' && (p - result < len)) { while (*c != '\0' && (p - result < len)) {
switch (*c) { switch ((uint8_t)*c) {
case 0xC4: // Ä case 0xC4: // Ä
*p = 0xC3; *p = 0xC3;
*(++p) = 0x84; *(++p) = 0x84;
@@ -432,9 +432,9 @@ char * Helpers::render_string(char * result, const char * c, const uint8_t len)
char * Helpers::utf8tolatin1(char * result, const char * c, const uint8_t len) { char * Helpers::utf8tolatin1(char * result, const char * c, const uint8_t len) {
char * p = result; char * p = result;
while (*c != '\0' && (p - result < len)) { while (*c != '\0' && (p - result < len)) {
if (*c == 0xC3) { if ((uint8_t)*c == 0xC3) {
c++; c++;
switch (*c) { switch ((uint8_t)*c) {
case 0x84: // Ä case 0x84: // Ä
*p = 0xC4; *p = 0xC4;
break; break;
@@ -459,7 +459,7 @@ char * Helpers::utf8tolatin1(char * result, const char * c, const uint8_t len) {
default: default:
break; break;
} }
} else if (*c > 127) { } else if ((uint8_t)*c > 127) {
*p = '?'; *p = '?';
} else { } else {
*p = *c; *p = *c;