aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-02-26 14:07:20 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-02-26 14:07:20 -0300
commitf935d3397ea56699d5ad218fade597514155e580 (patch)
tree6284616422cfea6ecbf51b40397756fee11d11f9
parent30dd3a2dbc9f503dfdb119e00635aff64715bd46 (diff)
downloadlua-f935d3397ea56699d5ad218fade597514155e580.tar.gz
lua-f935d3397ea56699d5ad218fade597514155e580.tar.bz2
lua-f935d3397ea56699d5ad218fade597514155e580.zip
check if jump is bigger than 2^16.
-rw-r--r--lua.stx8
1 files 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 @@
1%{ 1%{
2 2
3char *rcs_luastx = "$Id: lua.stx,v 3.31 1996/02/13 17:30:39 roberto Exp roberto $"; 3char *rcs_luastx = "$Id: lua.stx,v 3.32 1996/02/14 18:25:04 roberto Exp roberto $";
4 4
5#include <stdio.h> 5#include <stdio.h>
6#include <stdlib.h> 6#include <stdlib.h>
@@ -109,10 +109,12 @@ static void code_code (TFunc *tf)
109 code_byte(code.m.c4); 109 code_byte(code.m.c4);
110} 110}
111 111
112static void code_word_at (Byte *p, Word n) 112static void code_word_at (Byte *p, int n)
113{ 113{
114 CodeWord code; 114 CodeWord code;
115 code.w = n; 115 if ((Word)n != n)
116 yyerror("block too big");
117 code.w = (Word)n;
116 *p++ = code.m.c1; 118 *p++ = code.m.c1;
117 *p++ = code.m.c2; 119 *p++ = code.m.c2;
118} 120}