Minor Luac fixes (#2579)

This commit is contained in:
Terry Ellison 2018-12-03 21:41:50 +00:00 committed by GitHub
parent 8bb41fe93f
commit 401fa56b86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ static void DumpChar(int y, DumpState* D)
static void Align4(DumpState *D)
{
while(D->wrote&3)
while(D->wrote&3 && D->status==0)
DumpChar(0,D);
}

View File

@ -201,7 +201,7 @@ static void genCodeRecs (const codeRecord *rec, ushort len,
for (i = start; i < start+len; i++, c++) {
if (*c == 0xFF)
b++, c++;
m +=!(*c & 0x80) ? *c & 0x7F : 2 << *c;
m += (*c & 0x80) ? 2 << (*c & 0x1F) : *c;
*p++ = (codeRecord) {i, b, last + 1, (last = m)};
}
}