projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
181dedd
)
minor improvement of function to check for string suffix
author
Holger Schemel
<info@artsoft.org>
Mon, 14 Sep 2020 15:00:45 +0000
(17:00 +0200)
committer
Holger Schemel
<info@artsoft.org>
Mon, 14 Sep 2020 15:01:41 +0000
(17:01 +0200)
src/libgame/misc.c
patch
|
blob
|
history
diff --git
a/src/libgame/misc.c
b/src/libgame/misc.c
index c1450d4a7ab536e7751e7df69d92251b3f276f84..a02e19ecee48fad070d28cfaa904ece6d1a01757 100644
(file)
--- 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 :
- str
ncmp(&s[strlen(s) - strlen(suffix)], suffix, strlen(suffix)
) == 0);
+ str
cmp(&s[strlen(s) - strlen(suffix)], suffix
) == 0);
}
boolean strPrefixLower(char *s, char *prefix)