1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04: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