summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_unistr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index d9bd4a4c06..5d4697e441 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -52,22 +52,22 @@ void load_case_tables(void)
if (!upcase_table) {
DEBUG(1,("creating lame upcase table\n"));
upcase_table = malloc(0x20000);
- for (i=0;i<256;i++) upcase_table[i] = islower(i)?toupper(i):i;
- for (;i<0x10000;i++) upcase_table[i] = i;
+ for (i=0;i<256;i++) upcase_table[i] = UCS2_CHAR(islower(i)?toupper(i):i);
+ for (;i<0x10000;i++) upcase_table[i] = UCS2_CHAR(i);
}
if (!lowcase_table) {
DEBUG(1,("creating lame lowcase table\n"));
lowcase_table = malloc(0x20000);
- for (i=0;i<256;i++) lowcase_table[i] = isupper(i)?tolower(i):i;
- for (;i<0x10000;i++) lowcase_table[i] = i;
+ for (i=0;i<256;i++) lowcase_table[i] = UCS2_CHAR(isupper(i)?tolower(i):i);
+ for (;i<0x10000;i++) lowcase_table[i] = UCS2_CHAR(i);
}
if (!valid_table) {
const char *allowed = "!#$%&'()_-@^`~";
DEBUG(1,("creating lame valid table\n"));
valid_table = malloc(0x10000);
- for (i=0;i<256;i++) valid_table[i] = isalnum(i) || strchr(allowed,i);
+ for (i=0;i<256;i++) valid_table[i] = UCS2_CHAR(isalnum(i) || strchr(allowed,i));
for (;i<0x10000;i++) valid_table[i] = 0;
}
}