With this change printf passes the fuchsia unit tests, except the lack of field with and precision support. Disabled those parts of the test for now. Original change at https://fuchsia.googlesource.com/fuchsia/+/db61af0d1fc27c4c807f5da7d0553a4bb422882b The old code used to pad the output with zeros before the 0x, so you would end up with a 0000000x10. This is not the intended behavior. Original author: pedro.falcato@gmail.com