diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-04 22:54:57 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-04 22:54:57 -0700 |
commit | 8c593bcfc6cd1b6e6297dba11c094f63939545e4 (patch) | |
tree | 3347d320ba77c66d283d48f6c1aec4ded0dd7a72 | |
parent | 572f3d7b17e4411aa34acda11a74befe8d3315a6 (diff) | |
download | txr-8c593bcfc6cd1b6e6297dba11c094f63939545e4.tar.gz txr-8c593bcfc6cd1b6e6297dba11c094f63939545e4.tar.bz2 txr-8c593bcfc6cd1b6e6297dba11c094f63939545e4.zip |
itypes: fix wrong error messages.
* itypes.c (c_u8, c_u16, c_u32, c_u64, c_uint): Fix messages
referring to signed version of type.
-rw-r--r-- | itypes.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -51,7 +51,7 @@ u8_t c_u8(val n, val self) { cnum v = c_num(n); if (v < 0 || v > 255) - uw_throwf(error_s, lit("~a: value ~s out of signed 8 bit range"), + uw_throwf(error_s, lit("~a: value ~s out of unsigned 8 bit range"), self, n, nao); return v; } @@ -71,7 +71,7 @@ u16_t c_u16(val n, val self) { cnum v = c_num(n); if (v < 0 || v > 0xFFFF) - uw_throwf(error_s, lit("~a: value ~s is out of signed 16 bit range"), + uw_throwf(error_s, lit("~a: value ~s is out of unsigned 16 bit range"), self, n, nao); return v; } @@ -91,7 +91,7 @@ u32_t c_u32(val n, val self) { uint_ptr_t v = c_unum(n); if (v < 0 || v > 0xFFFFFFFF) - uw_throwf(error_s, lit("~a: value ~s is out of signed 32 bit range"), + uw_throwf(error_s, lit("~a: value ~s is out of unsigned 32 bit range"), self, n, nao); return v; } @@ -112,7 +112,7 @@ u64_t c_u64(val n, val self) { uint_ptr_t v = c_unum(n); if (v < (cnum) -0x8000000000000000 || v > (cnum) 0x7FFFFFFFFFFFFFFF) - uw_throwf(error_s, lit("~a: value ~s is out of signed 64 bit range"), + uw_throwf(error_s, lit("~a: value ~s is out of unsigned 64 bit range"), self, n, nao); return v; } @@ -183,7 +183,7 @@ unsigned int c_uint(val n, val self) { uint_ptr_t v = c_unum(n); if (v < 0 || v > UINT_MAX) - uw_throwf(error_s, lit("~a: value ~s is out of int range"), + uw_throwf(error_s, lit("~a: value ~s is out of unsigned int range"), self, n, nao); return v; } |