aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grab.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/grab.c b/grab.c
index 9fdfbd0..74f7e44 100644
--- a/grab.c
+++ b/grab.c
@@ -175,8 +175,13 @@ grab(struct ops ops, FILE *stream, const char *filename)
if (ferror(stream)) {
warn("fread: %s", filename);
rv = EXIT_FAILURE;
- } else
- cmdx((struct sv){.p = chars.buf, .len = chars.len}, ops, 0);
+ } else {
+ struct sv sv = {
+ .p = chars.buf,
+ .len = chars.len,
+ };
+ op_table[(uchar)ops.buf[0].c](sv, ops, 0);
+ }
free(chars.buf);
}