diff options
author | Andrés <andmarti@gmail.com> | 2021-02-26 08:47:37 -0300 |
---|---|---|
committer | Andrés <andmarti@gmail.com> | 2021-02-26 08:47:37 -0300 |
commit | 1f7cd175cce2283e634184522d62e381d526dcc5 (patch) | |
tree | 52ebd517052ab99774407a23d1977a05ce9c3e5d /src/interp.c | |
parent | 281b870c316c4cb7540fe354584c4a93a5a78565 (diff) |
fix @chr in depgraph
Diffstat (limited to 'src/interp.c')
-rw-r--r-- | src/interp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/interp.c b/src/interp.c index afb977d..6112fa5 100644 --- a/src/interp.c +++ b/src/interp.c @@ -1731,7 +1731,8 @@ char * seval(register struct ent * ent, register struct enode * se) { } return (p); } - case '#': return (docat(seval(ent, se->e.o.left), seval(ent, se->e.o.right))); + case '#': + return (docat(seval(ent, se->e.o.left), seval(ent, se->e.o.right))); case 'f': { int rtmp = rowoffset; @@ -1781,7 +1782,9 @@ char * seval(register struct ent * ent, register struct enode * se) { if (ent && getVertex(graph, ent, 0) == NULL) GraphAddVertex(graph, ent); return (strcpy(scxmalloc( (size_t) 10), coltoa((int) eval(NULL, se->e.o.left)))); - case CHR: return (strcpy(scxmalloc( (size_t) 10), dochr(eval(NULL, se->e.o.left)))); + case CHR: + if (ent && getVertex(graph, ent, 0) == NULL) GraphAddVertex(graph, ent); + return (strcpy(scxmalloc( (size_t) 10), dochr(eval(NULL, se->e.o.left)))); case FILENAME: { int n = eval(NULL, se->e.o.left); char *s = strrchr(curfile, '/'); @@ -3306,7 +3309,7 @@ void edits(int row, int col, int saveinfile) { (void) sprintf(line+linelim, "\""); linelim += 1; } -} + } /** * \brief TODO Document dateformat() |