From 02447abde8b342458d7aef0138bf9d41bdd72a93 Mon Sep 17 00:00:00 2001 From: BenTalagan Date: Tue, 19 Nov 2019 21:05:52 +0100 Subject: [PATCH] Fixing is_str_totally_null --- src/libespeak-ng/readclause.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libespeak-ng/readclause.c b/src/libespeak-ng/readclause.c index 264d289b..fe537908 100644 --- a/src/libespeak-ng/readclause.c +++ b/src/libespeak-ng/readclause.c @@ -137,7 +137,7 @@ int is_str_totally_null(const char* str, int size) { // This should never be reimplemented with integers, because // this function has to work with unaligned char* // (casting to int when unaligned may result in ungaranteed behaviors) - return *str || memcmp(str, str+1, size-1); + return (*str == 0 && memcmp(str, str+1, size-1) == 0); } int towlower2(unsigned int c, Translator *translator)