Skip to content

Commit 401fa56

Browse files
authored
Minor Luac fixes (#2579)
1 parent 8bb41fe commit 401fa56

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/lua/ldump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static void DumpChar(int y, DumpState* D)
4747

4848
static void Align4(DumpState *D)
4949
{
50-
while(D->wrote&3)
50+
while(D->wrote&3 && D->status==0)
5151
DumpChar(0,D);
5252
}
5353

app/uzlib/uzlib_deflate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ static void genCodeRecs (const codeRecord *rec, ushort len,
201201
for (i = start; i < start+len; i++, c++) {
202202
if (*c == 0xFF)
203203
b++, c++;
204-
m +=!(*c & 0x80) ? *c & 0x7F : 2 << *c;
204+
m += (*c & 0x80) ? 2 << (*c & 0x1F) : *c;
205205
*p++ = (codeRecord) {i, b, last + 1, (last = m)};
206206
}
207207
}

0 commit comments

Comments
 (0)