summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-08-02 17:52:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:20 -0500
commit6e98a3c9994883f911b7027e4bd8fb3238bd2bb3 (patch)
tree67cab84d65366f4811287783da84235a605cafe1 /source3/lib
parent602e2175a2dda961c1ba12b0513897aaa8e39869 (diff)
downloadsamba-6e98a3c9994883f911b7027e4bd8fb3238bd2bb3.tar.gz
samba-6e98a3c9994883f911b7027e4bd8fb3238bd2bb3.tar.bz2
samba-6e98a3c9994883f911b7027e4bd8fb3238bd2bb3.zip
r8928: Fix mangle method = hash - bugid #2946. Incorrect strcmp_wa and
strncmp_wa. Jeremy. (This used to be commit 604c1b239bca316f7afaf76b1a586c638f3a2562)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_unistr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index b31e01474a..6b29a0d26a 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -815,7 +815,7 @@ int strcmp_wa(const smb_ucs2_t *a, const char *b)
a++;
b++;
}
- return (cp - UCS2_CHAR(*b));
+ return (*(COPY_UCS2_CHAR(&cp,a)) - UCS2_CHAR(*b));
}
int strncmp_wa(const smb_ucs2_t *a, const char *b, size_t len)
@@ -828,7 +828,7 @@ int strncmp_wa(const smb_ucs2_t *a, const char *b, size_t len)
b++;
n++;
}
- return (len - n)?(cp - UCS2_CHAR(*b)):0;
+ return (len - n)?(*(COPY_UCS2_CHAR(&cp,a)) - UCS2_CHAR(*b)):0;
}
smb_ucs2_t *strpbrk_wa(const smb_ucs2_t *s, const char *p)