diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-05-06 14:19:08 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-05-06 14:19:08 -0300 |
commit | 61a4e64a6667bedaa882571c48a173ef5a4ba73b (patch) | |
tree | a68bc1aef4dded2da5f4b0bd8c084075c18ae355 /lundump.c | |
parent | 9a6f47f0edfded799f7cb6fd719bb0071b326100 (diff) | |
download | lua-61a4e64a6667bedaa882571c48a173ef5a4ba73b.tar.gz lua-61a4e64a6667bedaa882571c48a173ef5a4ba73b.tar.bz2 lua-61a4e64a6667bedaa882571c48a173ef5a4ba73b.zip |
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.
Diffstat (limited to 'lundump.c')
-rw-r--r-- | lundump.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -276,7 +276,7 @@ static void fchecksize (LoadState *S, size_t size, const char *tname) { | |||
276 | static void checkHeader (LoadState *S) { | 276 | static void checkHeader (LoadState *S) { |
277 | /* skip 1st char (already read and checked) */ | 277 | /* skip 1st char (already read and checked) */ |
278 | checkliteral(S, &LUA_SIGNATURE[1], "not a binary chunk"); | 278 | checkliteral(S, &LUA_SIGNATURE[1], "not a binary chunk"); |
279 | if (loadInt(S) != LUAC_VERSION) | 279 | if (loadByte(S) != LUAC_VERSION) |
280 | error(S, "version mismatch"); | 280 | error(S, "version mismatch"); |
281 | if (loadByte(S) != LUAC_FORMAT) | 281 | if (loadByte(S) != LUAC_FORMAT) |
282 | error(S, "format mismatch"); | 282 | error(S, "format mismatch"); |