Fix num2hex()'s handling of zero
Merge pull request #7250 from GinjaNinja32/num2hex2

Fix num2hex()'s handling of zero