diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1993-12-28 14:42:29 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1993-12-28 14:42:29 -0200 |
commit | 019aa98f806c499dc5d109610cd040206ae768ae (patch) | |
tree | 74c8cbf04ca7f92e4a06c7d7d960b3381fc880ae | |
parent | 23bfcdf970aa9fa5fc2c8c564a97dc476936e681 (diff) | |
download | lua-019aa98f806c499dc5d109610cd040206ae768ae.tar.gz lua-019aa98f806c499dc5d109610cd040206ae768ae.tar.bz2 lua-019aa98f806c499dc5d109610cd040206ae768ae.zip |
correcao de bug em constantes (rotina code_number) entre
2 bytes e 4 bytes.
-rw-r--r-- | lua.stx | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,6 +1,6 @@ | |||
1 | %{ | 1 | %{ |
2 | 2 | ||
3 | char *rcs_luastx = "$Id: lua.stx,v 1.1 1993/12/17 18:53:07 celes Exp roberto $"; | 3 | char *rcs_luastx = "$Id: lua.stx,v 1.2 1993/12/22 21:19:23 roberto Exp roberto $"; |
4 | 4 | ||
5 | #include <stdio.h> | 5 | #include <stdio.h> |
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
@@ -111,8 +111,8 @@ static void align_n (unsigned size) | |||
111 | } | 111 | } |
112 | 112 | ||
113 | static void code_number (float f) | 113 | static void code_number (float f) |
114 | { int i = f; | 114 | { Word i = (Word)f; |
115 | if (f == i) /* f has an integer value */ | 115 | if (f == (float)i) /* f has an (short) integer value */ |
116 | { | 116 | { |
117 | if (i <= 2) code_byte(PUSH0 + i); | 117 | if (i <= 2) code_byte(PUSH0 + i); |
118 | else if (i <= 255) | 118 | else if (i <= 255) |