summaryrefslogtreecommitdiff
path: root/nasmlib.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-06-28 18:31:08 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-06-28 18:31:08 -0700
commitedc510a115806527f64b90f5f865e1dfb478d731 (patch)
tree65c65d94ada280e90c0ea52f4a7a4862df84de38 /nasmlib.c
parent538002dc01a5911d70870b94b074c9ff8983d545 (diff)
downloadnasm-edc510a115806527f64b90f5f865e1dfb478d731.tar.gz
nasm-edc510a115806527f64b90f5f865e1dfb478d731.tar.bz2
nasm-edc510a115806527f64b90f5f865e1dfb478d731.zip
nasmlib: fix nasm_str[n]icmp()
Fix nasm_str[n]icmp() on platforms which don't have this function natively. XXX: Given the new nasm_tolower() implementation, we should consider if this might actually be a faster function than the platform-native one.
Diffstat (limited to 'nasmlib.c')
-rw-r--r--nasmlib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nasmlib.c b/nasmlib.c
index 0937b66..91eeb2f 100644
--- a/nasmlib.c
+++ b/nasmlib.c
@@ -168,8 +168,8 @@ int nasm_stricmp(const char *s1, const char *s2)
int d;
while (1) {
- c1 = *s1++;
- c2 = *s2++;
+ c1 = nasm_tolower(*s1++);
+ c2 = nasm_tolower(*s2++);
d = c1-c2;
if (d)
@@ -188,8 +188,8 @@ int nasm_strnicmp(const char *s1, const char *s2, size_t n)
int d;
while (n--) {
- c1 = *s1++;
- c2 = *s2++;
+ c1 = nasm_tolower(*s1++);
+ c2 = nasm_tolower(*s2++);
d = c1-c2;
if (d)