summaryrefslogtreecommitdiffstats
path: root/src/interp.c
diff options
context:
space:
mode:
authorandmarti1424 <andmarti@gmail.com>2017-02-05 14:43:10 -0300
committerandmarti1424 <andmarti@gmail.com>2017-02-05 14:43:10 -0300
commitcbbf70868fd4ac8226341c7235b0beee0cdc705f (patch)
tree05d9dd2d9a595ac2d7913ebc1d58bff188beed8d /src/interp.c
parent80103a5a5aa07d1feccdb7241ecb02bef8a1beb3 (diff)
Issue 108
Diffstat (limited to 'src/interp.c')
-rw-r--r--src/interp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interp.c b/src/interp.c
index a80ddb0..b94901d 100644
--- a/src/interp.c
+++ b/src/interp.c
@@ -769,7 +769,7 @@ double eval(register struct ent * ent, register struct enode * e) {
return (e->e.k);
case O_VAR: {
struct ent * vp = e->e.v.vp;
- if (vp && ent && vp->row == ent->row && vp->col == ent->col) {
+ if (vp && ent && vp->row == ent->row && vp->col == ent->col && !(vp->flags & is_deleted) ) {
sc_error("Circular reference in eval (cell %s%d)", coltoa(vp->col), vp->row);
//ERR propagates. comment to make it not to.
cellerror = CELLERROR;
@@ -778,7 +778,7 @@ double eval(register struct ent * ent, register struct enode * e) {
return (double) 0;
}
- if (vp && vp->cellerror == CELLERROR) {
+ if (vp && vp->cellerror == CELLERROR && !(vp->flags & is_deleted)) {
// here we store the dependences in a graph
if (ent && vp) GraphAddEdge( getVertex(graph, lookat(ent->row, ent->col), 1), getVertex(graph, lookat(vp->row, vp->col), 1) ) ;