summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@pingthings.io>2020-09-20 15:45:29 -0400
committerOri Bernstein <ori@pingthings.io>2020-09-20 15:45:29 -0400
commit433357fe9fd4e99c70c780a0204244f5fd618cf2 (patch)
tree3e5f17ae206ba198e96db539dea2d17d23fd09fe
parentd073dcc756169e572f54e65f05ba6b4ffaddcde3 (diff)
downloadmc-433357fe9fd4e99c70c780a0204244f5fd618cf2.tar.gz
Fix missing type in range tables.
-rw-r--r--parse/infer.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/parse/infer.c b/parse/infer.c
index b5c3e62..ba5509d 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -2571,16 +2571,20 @@ checkrange(Node *n)
uint64_t uval;
static const int64_t svranges[][2] = {
/* signed ints */
- [Tyint8] = {-128LL, 127LL}, [Tyint16] = {-32768LL, 32767LL},
- /* FIXME: this has been doubled allow for uints... */
- [Tyint32] = {-2147483648LL, 2 * 2147483647LL},
- [Tyint] = {-2147483648LL, 2 * 2147483647LL},
+ [Tyint8] = {-128LL, 127LL},
+ [Tyint16] = {-32768LL, 32767LL},
+ [Tyint32] = {-2147483648LL, 2147483647LL},
+ [Tyint] = {-2147483648LL, 2147483647LL},
[Tyint64] = {-9223372036854775808ULL, 9223372036854775807LL},
};
static const uint64_t uvranges[][2] = {
- [Tybyte] = {0, 255ULL}, [Tyuint8] = {0, 255ULL}, [Tyuint16] = {0, 65535ULL},
- [Tyuint32] = {0, 4294967295ULL}, [Tyuint64] = {0, 18446744073709551615ULL},
+ [Tybyte] = {0, 255ULL},
+ [Tyuint8] = {0, 255ULL},
+ [Tyuint16] = {0, 65535ULL},
+ [Tyuint] = {0, 4294967295ULL},
+ [Tyuint32] = {0, 4294967295ULL},
+ [Tyuint64] = {0, 18446744073709551615ULL},
[Tychar] = {0, 4294967295ULL},
};