diff options
author | Rob Landley <rob@landley.net> | 2006-06-28 14:36:50 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-06-28 14:36:50 +0000 |
commit | a6e6037219ff8f8992d4c7c366b4472b57c4aadc (patch) | |
tree | ea2056a9e2abca2a55782871dd5dda29480d2701 /libbb/dump.c | |
parent | db1ab1aeb3dd4401411d147e290261c8f1ad472f (diff) | |
download | busybox-a6e6037219ff8f8992d4c7c366b4472b57c4aadc.tar.gz |
Fix bug http://bugs.busybox.net/view.php?id=874 where hexdump -C got its
spacing wrong.
Diffstat (limited to 'libbb/dump.c')
-rw-r--r-- | libbb/dump.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libbb/dump.c b/libbb/dump.c index b12a8e223..45ddb4034 100644 --- a/libbb/dump.c +++ b/libbb/dump.c @@ -424,7 +424,7 @@ static unsigned char *get(void) static void bpad(PR * pr) { - register char *p1, *p2; + char *p1, *p2; /* * remove all conversion flags; '-' is the only one valid @@ -433,7 +433,8 @@ static void bpad(PR * pr) pr->flags = F_BPAD; *pr->cchar = 's'; for (p1 = pr->fmt; *p1 != '%'; ++p1); - for (p2 = ++p1; *p1 && strchr(" -0+#", *p1); ++p1); + for (p2 = ++p1; *p1 && strchr(" -0+#", *p1); ++p1) + if (pr->nospace) pr->nospace--; while ((*p2++ = *p1++) != 0); } |