correct printf handling of %x with long ints

Fixes #3352
This commit is contained in:
Kurtis Rader
2017-02-20 17:58:08 -08:00
parent 9f5ce04229
commit 3d0a377e26
4 changed files with 18 additions and 0 deletions

View File

@@ -61,3 +61,12 @@ else
echo '3,450000e+00'
echo '4,560000e+00'
end
# Verify long long ints are handled correctly. See issue #3352.
printf 'long hex1 %x\n' 498216206234
printf 'long hex2 %X\n' 498216206234
printf 'long hex3 %X\n' 0xABCDEF1234567890
printf 'long hex4 %X\n' 0xABCDEF12345678901
printf 'long decimal %d\n' 498216206594
printf 'long signed %d\n' -498216206595
printf 'long signed to unsigned %u\n' -498216206596