1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-02 08:57:19 -04:00

[charsets] compilation fix

This commit is contained in:
Witold Filipczyk 2023-01-29 20:09:45 +01:00
parent 0a5335573c
commit be40c1bb87

View File

@ -299,16 +299,16 @@ static char utf_buffer[7];
NONSTATIC_INLINE char * NONSTATIC_INLINE char *
encode_utf8(unicode_val_T u) encode_utf8(unicode_val_T u)
{ {
int s;
memset(utf_buffer, 0, 7);
#ifdef CONFIG_CODEPOINT #ifdef CONFIG_CODEPOINT
if (!is_codepoint_supported(u)) { if (!is_codepoint_supported(u)) {
int s;
BIN_SEARCH(unicode_7b, x, N_UNICODE_7B, u, s); BIN_SEARCH(unicode_7b, x, N_UNICODE_7B, u, s);
if (s != -1) return (char *)unicode_7b[s].s; if (s != -1) return (char *)unicode_7b[s].s;
} }
#endif #endif
memset(utf_buffer, 0, 7);
if (u < 0x80) if (u < 0x80)
utf_buffer[0] = u; utf_buffer[0] = u;
else if (u < 0x800) else if (u < 0x800)