diff options
author | Andrés <andmarti@gmail.com> | 2021-02-25 16:05:44 -0300 |
---|---|---|
committer | Andrés <andmarti@gmail.com> | 2021-02-25 16:05:44 -0300 |
commit | 79f01f0a48d7ac132c9a8fd0728145cae3599f1a (patch) | |
tree | f3c4457c45796ef160a932d9882cd23fc67060f1 /src | |
parent | 6206e64876e44ef94bc95f48ba5b18ae08a7c5fd (diff) |
work on issue #497
Diffstat (limited to 'src')
-rw-r--r-- | src/interp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/interp.c b/src/interp.c index f2d7bfd..3a1de25 100644 --- a/src/interp.c +++ b/src/interp.c @@ -1266,8 +1266,12 @@ double eval(register struct ent * ent, register struct enode * e) { case LMAX: return dolmax(ent, e); case LMIN: return dolmin(ent, e); case NVAL: return (donval(seval(ent, e->e.o.left), eval(ent, e->e.o.right))); - case MYROW: return ((double) (gmyrow + rowoffset)); - case MYCOL: return ((double) (gmycol + coloffset)); + case MYROW: + if (ent && getVertex(graph, ent, 0) == NULL) GraphAddVertex(graph, ent); + return ((double) (gmyrow + rowoffset)); + case MYCOL: + if (ent && getVertex(graph, ent, 0) == NULL) GraphAddVertex(graph, ent); + return ((double) (gmycol + coloffset)); case LASTROW: return ((double) maxrow); case LASTCOL: return ((double) maxcol); case ERR_: |