Minor code cleanup.
Fix a bug in num_to_hex. WinCompose wasn’t affected, but just in case
someone reuses that function.