On Fri, Jun 5, 2009 at 1:58 PM, Michael Abbott<[email protected]> wrote: > Next an oddity, this on both versions: > > $ printf %x -2147483648 > 0sh: -2147483648: invalid number > > That's a shame. But what about this one: > > $ printf %x -2147483647 > 0sh: -2147483647: invalid number
Hehe. printf is funny. -2 is ok for "%u, but $TOO_BIG_POSITIVE is not ok for %d: # /usr/bin/printf '%d\n' 9223372036854775808 /usr/bin/printf: 9223372036854775808: Numerical result out of range 9223372036854775807 # /usr/bin/printf '%u\n' 9223372036854775808 9223372036854775808 # /usr/bin/printf '%u\n' -2 18446744073709551614 I fixed busybox to match this, will be in 1.15.x -- vda _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
