Skip to content

Commit

Permalink
Work on issue #371
Browse files Browse the repository at this point in the history
  • Loading branch information
andmarti1424 committed Apr 18, 2021
1 parent 1e80b73 commit 9f03b16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/interp.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ double dolookup(struct enode * val, int minr, int minc, int maxr, int maxc, int
s = seval(NULL, val);
for (r = minr, c = minc; r <= maxr && c <= maxc; r+=incr, c+=incc) {
if ((p = *ATBL(tbl, r, c)) && p->label) {
if (strcmp(p->label,s) == 0) {
if (s && strcmp(p->label,s) == 0) {
fndr = incc ? (minr + offset) : r;
fndc = incr ? (minc + offset) : c;
if (ISVALID(fndr,fndc)) {
Expand All @@ -359,7 +359,7 @@ double dolookup(struct enode * val, int minr, int minc, int maxr, int maxc, int
}
if (p && p->flags & is_valid)
ret = p->v;
scxfree(s);
if (s != NULL) scxfree(s);
}
return ret;
}
Expand Down

0 comments on commit 9f03b16

Please sign in to comment.