From f935d3397ea56699d5ad218fade597514155e580 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 26 Feb 1996 14:07:20 -0300 Subject: [PATCH] check if jump is bigger than 2^16. --- lua.stx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua.stx b/lua.stx index 8270b7a4..878a691e 100644 --- a/lua.stx +++ b/lua.stx @@ -1,6 +1,6 @@ %{ -char *rcs_luastx = "$Id: lua.stx,v 3.31 1996/02/13 17:30:39 roberto Exp roberto $"; +char *rcs_luastx = "$Id: lua.stx,v 3.32 1996/02/14 18:25:04 roberto Exp roberto $"; #include #include @@ -109,10 +109,12 @@ static void code_code (TFunc *tf) code_byte(code.m.c4); } -static void code_word_at (Byte *p, Word n) +static void code_word_at (Byte *p, int n) { CodeWord code; - code.w = n; + if ((Word)n != n) + yyerror("block too big"); + code.w = (Word)n; *p++ = code.m.c1; *p++ = code.m.c2; }