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

Fix num2hex()'s handling of zero
Fix for #7232.
Fix for #7204.
Merge pull request #7254 from Segrain/master

Bugfixes.