diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-10-05 13:13:31 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-10-05 13:13:31 +0000 |
commit | f3c79936d7fc21d3257432962b23764ca00b0cbb (patch) | |
tree | 8f942150cf4c7b549ea5e7aa3175ee6e1f61df98 /source3/smbd/mangle.c | |
parent | f6153293603e8413933e8d539df4f2c0b18a6a4c (diff) | |
download | samba-f3c79936d7fc21d3257432962b23764ca00b0cbb.tar.gz samba-f3c79936d7fc21d3257432962b23764ca00b0cbb.tar.bz2 samba-f3c79936d7fc21d3257432962b23764ca00b0cbb.zip |
- replace the base36 function with one that works on more systems
(compiler bugs were the problem)
- minor password cleanups (catch WfWG bug where it sets the password
to a space instead of a NULL)
- fix printing problem for kanji users
- minor cleanups
(This used to be commit 92566ecc315c29da6e9aaa67ddae33e64f5bcc67)
Diffstat (limited to 'source3/smbd/mangle.c')
-rw-r--r-- | source3/smbd/mangle.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source3/smbd/mangle.c b/source3/smbd/mangle.c index 177a34c975..6d98d9e39c 100644 --- a/source3/smbd/mangle.c +++ b/source3/smbd/mangle.c @@ -383,13 +383,10 @@ BOOL is_mangled(char *s) /**************************************************************************** return a base 36 character. v must be from 0 to 35. ****************************************************************************/ -static char base36(int v) +static char base36(unsigned int v) { - v = v % 36; - if (v < 10) - return('0'+v); - else /* needed to work around a DEC C compiler bug */ - return('A' + (v-10)); + static char basechars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + return basechars[v % 36]; } |