summaryrefslogtreecommitdiff
path: root/bin/ksh/var.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ksh/var.c')
-rw-r--r--bin/ksh/var.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/ksh/var.c b/bin/ksh/var.c
index 52d6e3a7a45..118fdc79cf1 100644
--- a/bin/ksh/var.c
+++ b/bin/ksh/var.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: var.c,v 1.28 2005/12/11 20:31:21 otto Exp $ */
+/* $OpenBSD: var.c,v 1.29 2006/03/13 08:21:37 otto Exp $ */
#include "sh.h"
#include <time.h>
@@ -430,6 +430,9 @@ getint(struct tbl *vp, long int *nump, bool arith)
if (*s == 'x' || *s == 'X') {
s++;
base = 16;
+ } else if (vp->flag & ZEROFIL) {
+ while (*s == '0')
+ s++;
} else
base = 8;
have_base++;