shithub: mc

Download patch

ref: d073dcc756169e572f54e65f05ba6b4ffaddcde3
parent: e0efab37a8bbd245e60c9adffaba4182aeb17c87
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Sep 1 15:15:12 EDT 2020

infer: fix typo on range check

--- a/parse/infer.c
+++ b/parse/infer.c
@@ -2590,7 +2590,7 @@
 		sval = n->lit.intval;
 		if (sval < svranges[t->type][0] || sval > svranges[t->type][1])
 			fatal(n, "literal value %lld out of range for type \"%s\"", sval, tystr(t));
-	} else if ((t->type >= Tybyte && t->type <= Tyint64) || t->type == Tychar) {
+	} else if ((t->type >= Tybyte && t->type <= Tyuint64) || t->type == Tychar) {
 		uval = n->lit.intval;
 		if (uval < uvranges[t->type][0] || uval > uvranges[t->type][1])
 			fatal(n, "literal value %llu out of range for type \"%s\"", uval, tystr(t));