Skip to content

Commit

Permalink
lj_ctype.c: Detect bad ctypeid without failing lua_assert
Browse files Browse the repository at this point in the history
  • Loading branch information
lukego committed Oct 8, 2018
1 parent 2a7990a commit 55e7656
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lj_ctype.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,10 @@ static void ctype_repr(CTRepr *ctr, CTypeID id)
ctr->ok = 0;
return;
}
if (ctype_cid(info) == 0) {
ctr->ok = 0;
return;
}
newct = ctype_get(ctr->cts, ctype_cid(info));
/* Detect ctypes that are not OK due to looping. */
if (newct == ct) {
Expand Down

0 comments on commit 55e7656

Please sign in to comment.