Skip to content

Commit

Permalink
Fix regexp crash
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 4262dee624bed5f962c89e5843784a60d5cb60dfbcc878752466e6e8b4643b8a
  • Loading branch information
pmacdona committed Aug 6, 2022
1 parent 62aca58 commit 4e5066c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Jsi is a **javascript**-ish interpreter with builtin websocket-server, sqlite an

Get source and build '''make'''.

Or download a binary for (https://github.com/pcmacdon/jsibin/).
Or download a binary: https://github.com/pcmacdon/jsibin/


🚩 See [Start](./lib/www/md/Start.md).
Expand Down
2 changes: 1 addition & 1 deletion src/jsiObj.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void Jsi_ObjFree(Jsi_Interp *interp, Jsi_Obj *obj)
case JSI_OT_OBJECT:
break;
case JSI_OT_REGEXP:
if ((obj->d.robj->eflags&JSI_REG_STATIC)==0) {
if (obj->d.robj && (obj->d.robj->eflags&JSI_REG_STATIC)==0) {
regfree(&obj->d.robj->reg);
Jsi_Free(obj->d.robj);
}
Expand Down

0 comments on commit 4e5066c

Please sign in to comment.