1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-10 12:58:35 +03:00

r8928: Fix mangle method = hash - bugid #2946. Incorrect strcmp_wa and

strncmp_wa.
Jeremy.
(This used to be commit 604c1b239bca316f7afaf76b1a586c638f3a2562)
This commit is contained in:
Jeremy Allison 2005-08-02 17:52:44 +00:00 committed by Gerald (Jerry) Carter
parent 602e2175a2
commit 6e98a3c999

View File

@ -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)