[Bug 13486] New: awk printf("%c", 0) doesn't print anything
bugzilla at busybox.net
bugzilla at busybox.net
Tue Jan 26 22:10:44 UTC 2021
https://bugs.busybox.net/show_bug.cgi?id=13486
Bug ID: 13486
Summary: awk printf("%c", 0) doesn't print anything
Product: Busybox
Version: 1.33.x
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: alt.j2-4o4s2yon at yopmail.com
CC: busybox-cvs at busybox.net
Target Milestone: ---
testcase:
echo -n "7F454C460201010000" | awk 'BEGIN{ht="123456789ABCDEF";}function
h2i(h){return index(ht, substr(h,1,1))*16+index(ht,substr(h,2,1));}
{for(i=1;i<=length($0);i+=2)printf("%c", h2i(substr($0,i,2)));}' | hexdump -ve
'1/1 "%.2X"'
prints 7F454C460201010000 on gawk and mawk, busybox swallows the 2 null bytes
at the end.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list