shithub: mc

Download patch

ref: 433357fe9fd4e99c70c780a0204244f5fd618cf2
parent: d073dcc756169e572f54e65f05ba6b4ffaddcde3
author: Ori Bernstein <ori@pingthings.io>
date: Sun Sep 20 11:45:29 EDT 2020

Fix missing type in range tables.

--- a/parse/infer.c
+++ b/parse/infer.c
@@ -2571,16 +2571,20 @@
 	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},
 	};