Fixes #978
This commit is contained in:
@@ -198,7 +198,9 @@ char idx2char(int8_t idx)
|
||||
if (idx < 27) return 'A' + idx - 1;
|
||||
if (idx < 37) return '0' + idx - 27;
|
||||
if (idx <= 40) return pgm_read_byte(s_charTab+idx-37);
|
||||
// Needed if we want the special chars ... if (idx <= ZCHAR_MAX) return 'z' + 5 + idx - 40;
|
||||
#if LEN_SPECIAL_CHARS > 0
|
||||
if (idx <= ZCHAR_MAX) return 'z' + 5 + idx - 40;
|
||||
#endif
|
||||
return ' ';
|
||||
}
|
||||
|
||||
@@ -206,6 +208,9 @@ char idx2char(int8_t idx)
|
||||
int8_t char2idx(char c)
|
||||
{
|
||||
if (c == '_') return 37;
|
||||
#if LEN_SPECIAL_CHARS > 0
|
||||
if (c < 0 && c+128 <= LEN_SPECIAL_CHARS) return 41 + (c+128);
|
||||
#endif
|
||||
if (c >= 'a') return 'a' - c - 1;
|
||||
if (c >= 'A') return c - 'A' + 1;
|
||||
if (c >= '0') return c - '0' + 27;
|
||||
|
||||
Reference in New Issue
Block a user