mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-12-03 23:09:52 +00:00
encoding.c: Don't crash when passing a NULL string to LookupMnem.
This commit is contained in:
+2
-1
@@ -27,8 +27,9 @@
|
||||
void
|
||||
test_unknown_encoding()
|
||||
{
|
||||
printf("testing unknown encoding\n");
|
||||
printf("testing unknown encodings\n");
|
||||
|
||||
assert(espeak_ng_EncodingFromName(NULL) == ESPEAKNG_ENCODING_UNKNOWN);
|
||||
assert(espeak_ng_EncodingFromName("") == ESPEAKNG_ENCODING_UNKNOWN);
|
||||
assert(espeak_ng_EncodingFromName("abcxyz") == ESPEAKNG_ENCODING_UNKNOWN);
|
||||
assert(espeak_ng_EncodingFromName("US") == ESPEAKNG_ENCODING_UNKNOWN); // wrong case
|
||||
|
||||
Reference in New Issue
Block a user