mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
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.
This commit is contained in:
parent
9a6f47f0ed
commit
61a4e64a66
5 changed files with 11 additions and 6 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue