diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-04-14 19:25:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-04-14 19:25:12 +0000 |
commit | 936e98a94c4eaafa4983b0ab26172f0b9c81f265 (patch) | |
tree | 7c4408a6d83d91192e637d7eed302c47f25a822e /lib | |
parent | f2723e7c92fcd2ff26359e6580ccd73987c592c2 (diff) |
wrap Z->a and z->A; peter@netplex.com.au
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdio/mktemp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c index f4e5e0f29fa..53b40b027f3 100644 --- a/lib/libc/stdio/mktemp.c +++ b/lib/libc/stdio/mktemp.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: mktemp.c,v 1.11 1998/03/04 02:34:49 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mktemp.c,v 1.12 1998/04/14 19:25:11 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -159,11 +159,13 @@ _gettemp(path, doopen, domkdir) for (trv = start;;) { if (!*trv) return(0); - if (*trv == 'z') + if (*trv == 'Z') *trv++ = 'a'; else { if (isdigit(*trv)) *trv = 'a'; + else if (*trv == 'z') /* inc from z to A */ + *trv = 'A'; else ++*trv; break; |