1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[mujs] accesskey. Treat empty string specially

This commit is contained in:
Witold Filipczyk 2022-08-27 20:09:17 +02:00
parent 67cc6acd45
commit a387952fe7

View File

@ -107,10 +107,13 @@ mjs_value_to_accesskey(const char *val)
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
const char *end = strchr(val, '\0');
char *begin = val;
if (*val) {
const char *end = strchr(val, '\0');
char *begin = val;
return utf8_to_unicode(&begin, end);
return utf8_to_unicode(&begin, end);
}
return 0;
}
static void