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 | 92566ecc315c29da6e9aaa67ddae33e64f5bcc67 (patch) | |
tree | 780b95bedf0c10e8292d999028c1e41b240d6f39 /source/smbd/mangle.c | |
parent | 975ddfd3099b9625d674ee862d4174d03ba7386e (diff) | |
download | samba-92566ecc315c29da6e9aaa67ddae33e64f5bcc67.tar.gz samba-92566ecc315c29da6e9aaa67ddae33e64f5bcc67.tar.xz samba-92566ecc315c29da6e9aaa67ddae33e64f5bcc67.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
Diffstat (limited to 'source/smbd/mangle.c')
-rw-r--r-- | source/smbd/mangle.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c index 177a34c9751..6d98d9e39c5 100644 --- a/source/smbd/mangle.c +++ b/source/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]; } |