diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2024-10-28 15:26:21 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2024-12-09 11:17:14 +0100 |
commit | 87e60dcf0f7ef917b73353d8605188a420bd91f9 (patch) | |
tree | 4bbb50182e3f5dfc077458971933056268a01786 /libbb/dump.c | |
parent | 175b8dda19022f5ca5b81f87248924817e7ea1cf (diff) | |
download | busybox-w32-87e60dcf0f7ef917b73353d8605188a420bd91f9.tar.gz busybox-w32-87e60dcf0f7ef917b73353d8605188a420bd91f9.tar.bz2 busybox-w32-87e60dcf0f7ef917b73353d8605188a420bd91f9.zip |
hexdump: fix regression with -n4 -e '"%u"'
Fix bug introduced in busybox 1.37.0 that broke kernel builds.
Fixes commit e2287f99fe6f (od: for !DESKTOP, match output more closely
to GNU coreutils 9.1, implement -s)
function old new delta
rewrite 967 976 +9
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/dump.c')
-rw-r--r-- | libbb/dump.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libbb/dump.c b/libbb/dump.c index b406a2428..2ca9919da 100644 --- a/libbb/dump.c +++ b/libbb/dump.c | |||
@@ -198,9 +198,11 @@ static NOINLINE void rewrite(priv_dumper_t *dumper, FS *fs) | |||
198 | if (!e) | 198 | if (!e) |
199 | goto DO_BAD_CONV_CHAR; | 199 | goto DO_BAD_CONV_CHAR; |
200 | pr->flags = F_INT; | 200 | pr->flags = F_INT; |
201 | if (e > int_convs + 1) /* not d or i? */ | ||
202 | pr->flags = F_UINT; | ||
203 | byte_count_str = "\010\004\002\001"; | 201 | byte_count_str = "\010\004\002\001"; |
202 | if (e > int_convs + 1) { /* not d or i? */ | ||
203 | pr->flags = F_UINT; | ||
204 | byte_count_str++; | ||
205 | } | ||
204 | goto DO_BYTE_COUNT; | 206 | goto DO_BYTE_COUNT; |
205 | } else | 207 | } else |
206 | if (strchr(int_convs, *p1)) { /* %d etc */ | 208 | if (strchr(int_convs, *p1)) { /* %d etc */ |