summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/util_unistr.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/lib/util_unistr.c b/source4/lib/util_unistr.c
index 672c7cd2c8..7d10b92c43 100644
--- a/source4/lib/util_unistr.c
+++ b/source4/lib/util_unistr.c
@@ -54,16 +54,16 @@ static void load_case_tables(void)
********************************************************************/
codepoint_t toupper_w(codepoint_t val)
{
- if (val & 0xFFFF0000) {
- return val;
- }
if (val < 128) {
return toupper(val);
}
+ if (upcase_table == (void *)-1) {
+ return val;
+ }
if (upcase_table == NULL) {
load_case_tables();
}
- if (upcase_table == (void *)-1) {
+ if (val & 0xFFFF0000) {
return val;
}
return SVAL(upcase_table, val*2);
@@ -74,16 +74,16 @@ codepoint_t toupper_w(codepoint_t val)
********************************************************************/
codepoint_t tolower_w(codepoint_t val)
{
- if (val & 0xFFFF0000) {
- return val;
- }
if (val < 128) {
return tolower(val);
}
+ if (lowcase_table == (void *)-1) {
+ return val;
+ }
if (lowcase_table == NULL) {
load_case_tables();
}
- if (lowcase_table == (void *)-1) {
+ if (val & 0xFFFF0000) {
return val;
}
return SVAL(lowcase_table, val*2);