diff --git a/Firmware/language.c b/Firmware/language.c index 78512f18..67b80f68 100644 --- a/Firmware/language.c +++ b/Firmware/language.c @@ -39,6 +39,8 @@ const char* lang_get_translation(const char* s) uint16_t ui = pgm_read_word(((uint16_t*)s)); //read string id if (ui == 0xffff) return s + 2; //translation not found ui = pgm_read_word(((uint16_t*)(((char*)lang_table + 16 + ui*2)))); //read relative offset + if (pgm_read_byte(((uint8_t*)((char*)lang_table + ui))) == 0) + return s + 2;//not translated string return (const char*)((char*)lang_table + ui); //return calculated pointer }