|
@@ -276,7 +276,7 @@ static void fchecksize (LoadState *S, size_t size, const char *tname) {
|
|
static void checkHeader (LoadState *S) {
|
|
static void checkHeader (LoadState *S) {
|
|
/* skip 1st char (already read and checked) */
|
|
/* skip 1st char (already read and checked) */
|
|
checkliteral(S, &LUA_SIGNATURE[1], "not a binary chunk");
|
|
checkliteral(S, &LUA_SIGNATURE[1], "not a binary chunk");
|
|
- if (loadInt(S) != LUAC_VERSION)
|
|
|
|
|
|
+ if (loadByte(S) != LUAC_VERSION)
|
|
error(S, "version mismatch");
|
|
error(S, "version mismatch");
|
|
if (loadByte(S) != LUAC_FORMAT)
|
|
if (loadByte(S) != LUAC_FORMAT)
|
|
error(S, "format mismatch");
|
|
error(S, "format mismatch");
|