Skip to content

Commit

Permalink
Merge pull request snabbco#192 from lukego/log-ctype-assert
Browse files Browse the repository at this point in the history
lj_ctype.c: Detect bad ctypeid without failing lua_assert
  • Loading branch information
lukego committed Oct 9, 2018
2 parents fc0c107 + 55e7656 commit d44450e
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 d44450e

Please sign in to comment.