ref: f9d32f7c16bc2762bd688ce88db273739a814b6c
parent: a2e593332e9e24358a2853bcb74a804ddabc0658
author: Ori Bernstein <[email protected]>
date: Fri Dec 1 21:37:16 EST 2023
cons: end epoch in error case
--- a/cons.c
+++ b/cons.c
@@ -320,13 +320,14 @@
buf[n] = 0;
nf = tokenize(buf, f, nelem(f));
if(nf == 0 || strlen(f[0]) == 0)
- continue;
+ goto Next;
for(c = cmdtab; c->name != nil; c++){
ap = f;
na = nf;
if(strcmp(c->name, *ap) != 0)
continue;
- ap++; na--;
+ ap++;
+ na--;
if(c->sub != nil){
if(na == 0 || strcmp(c->sub, *ap) != 0)
continue;
@@ -344,6 +345,7 @@
fprint(fd, " %s", f[i]);
fprint(fd, "'\n");
}
+Next:
epochend(tid);
}
}