diff options
author | Jeremy Allison <jra@samba.org> | 1997-12-11 12:25:01 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1997-12-11 12:25:01 +0000 |
commit | 155562e514ca0abc537f53b612a7df13461829ac (patch) | |
tree | 61b28d392ecfc17e26665e75da24fb9517382182 /source3/lib | |
parent | 7735e4d5868d2ddb659c8e76123174b553d05f55 (diff) | |
download | samba-155562e514ca0abc537f53b612a7df13461829ac.tar.gz samba-155562e514ca0abc537f53b612a7df13461829ac.tar.bz2 samba-155562e514ca0abc537f53b612a7df13461829ac.zip |
fixed over char 127 problems with isupper/islower.
Jeremy.
(This used to be commit 4ac95226fff8e48a0024e2beb78df662fcfeda62)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/charset.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/lib/charset.c b/source3/lib/charset.c index 217f407b9e..e29e60303a 100644 --- a/source3/lib/charset.c +++ b/source3/lib/charset.c @@ -167,8 +167,13 @@ void charset_initialise() for (i=0; i<=255; i++) { char c = (char)i; upper_char_map[i] = lower_char_map[i] = c; - if (isupper(c)) lower_char_map[i] = tolower(c); - if (islower(c)) upper_char_map[i] = toupper(c); + + /* Some systems have buggy isupper/islower for characters + above 127. Best not to rely on them. */ + if(i < 128) { + if (isupper(c)) lower_char_map[i] = tolower(c); + if (islower(c)) upper_char_map[i] = toupper(c); + } } } |