summaryrefslogtreecommitdiff
path: root/src/strgen
diff options
context:
space:
mode:
Diffstat (limited to 'src/strgen')
-rw-r--r--src/strgen/strgen.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index 61fcecd7b..a44644949 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -965,7 +965,11 @@ static int TranslateArgumentIdx(int argidx, int offset)
}
const CmdStruct *cs = _cur_pcs.cmd[argidx];
if (cs != NULL && cs->consumes <= offset) {
- error("invalid argidx offset %d:%d\n", argidx, offset);
+ error("invalid argidx offset %d:%d", argidx, offset);
+ }
+
+ if (_cur_pcs.cmd[argidx] == NULL) {
+ error("no command for this argidx %d", argidx);
}
for (int i = sum = 0; i < argidx; i++) {