From 61a4e64a6667bedaa882571c48a173ef5a4ba73b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 6 May 2020 14:19:08 -0300 Subject: Back to old encoding of versions in binary files (Undoing part of commit f53eabeed8.) It is better to keep this encoding stable, so that all Lua versions can read at least the version of a binary file. --- lundump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lundump.c') diff --git a/lundump.c b/lundump.c index 17364999..d6b249d5 100644 --- a/lundump.c +++ b/lundump.c @@ -276,7 +276,7 @@ static void fchecksize (LoadState *S, size_t size, const char *tname) { static void checkHeader (LoadState *S) { /* skip 1st char (already read and checked) */ checkliteral(S, &LUA_SIGNATURE[1], "not a binary chunk"); - if (loadInt(S) != LUAC_VERSION) + if (loadByte(S) != LUAC_VERSION) error(S, "version mismatch"); if (loadByte(S) != LUAC_FORMAT) error(S, "format mismatch"); -- cgit v1.2.3-55-g6feb