diff options
Diffstat (limited to 'lua.stx')
-rw-r--r-- | lua.stx | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,6 +1,6 @@ | |||
1 | %{ | 1 | %{ |
2 | 2 | ||
3 | char *rcs_luastx = "$Id: lua.stx,v 3.41 1996/11/08 12:49:35 roberto Exp roberto $"; | 3 | char *rcs_luastx = "$Id: lua.stx,v 3.42 1997/01/15 16:11:37 roberto Exp roberto $"; |
4 | 4 | ||
5 | #include <stdio.h> | 5 | #include <stdio.h> |
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
@@ -163,9 +163,9 @@ static void add_varbuffer (Long var) | |||
163 | 163 | ||
164 | static void code_number (float f) | 164 | static void code_number (float f) |
165 | { | 165 | { |
166 | Word i = (Word)f; | 166 | Word i; |
167 | if (f == (float)i) /* f has an (short) integer value */ | 167 | if (f >= 0 && f <= (float)MAX_WORD && (float)(i=(Word)f) == f) { |
168 | { | 168 | /* f has an (short) integer value */ |
169 | if (i <= 2) code_byte(PUSH0 + i); | 169 | if (i <= 2) code_byte(PUSH0 + i); |
170 | else if (i <= 255) | 170 | else if (i <= 255) |
171 | { | 171 | { |