=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/dc/inout.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/dc/inout.c 2003/09/19 19:00:36 1.2 +++ src/usr.bin/dc/inout.c 2003/09/19 19:06:29 1.3 @@ -1,4 +1,4 @@ -/* $OpenBSD: inout.c,v 1.2 2003/09/19 19:00:36 deraadt Exp $ */ +/* $OpenBSD: inout.c,v 1.3 2003/09/19 19:06:29 deraadt Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek @@ -17,7 +17,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: inout.c,v 1.2 2003/09/19 19:00:36 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: inout.c,v 1.3 2003/09/19 19:06:29 deraadt Exp $"; #endif /* not lint */ #include @@ -243,6 +243,7 @@ get_digit(u_long num, int digits, u_int base) { char *p; + if (base <= 16) { p = bmalloc(2); p[0] = num >= 10 ? num + 'A' - 10 : num + '0';