From: Holger Schemel Date: Mon, 14 Sep 2020 15:00:45 +0000 (+0200) Subject: minor improvement of function to check for string suffix X-Git-Tag: 4.2.0.3~45 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5bca73f941d8f53593124ff6e0c11ed5f767124b;p=rocksndiamonds.git minor improvement of function to check for string suffix --- diff --git a/src/libgame/misc.c b/src/libgame/misc.c index c1450d4a..a02e19ec 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -876,7 +876,7 @@ boolean strSuffix(char *s, char *suffix) s == NULL && suffix != NULL ? FALSE : s != NULL && suffix == NULL ? FALSE : strlen(s) < strlen(suffix) ? FALSE : - strncmp(&s[strlen(s) - strlen(suffix)], suffix, strlen(suffix)) == 0); + strcmp(&s[strlen(s) - strlen(suffix)], suffix) == 0); } boolean strPrefixLower(char *s, char *prefix)