aboutsummaryrefslogtreecommitdiff
path: root/miscutils/dc.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/dc.c')
-rw-r--r--miscutils/dc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/miscutils/dc.c b/miscutils/dc.c
index a7bd360d2..f94d6fa6b 100644
--- a/miscutils/dc.c
+++ b/miscutils/dc.c
@@ -244,9 +244,9 @@ static void stack_machine(const char *argument)
244 244
245 o = operators; 245 o = operators;
246 do { 246 do {
247 const size_t name_len = strlen(o->name); 247 char *after_name = is_prefixed_with(argument, o->name);
248 if (strncmp(o->name, argument, name_len) == 0) { 248 if (after_name) {
249 argument += name_len; 249 argument = after_name;
250 o->function(); 250 o->function();
251 goto next; 251 goto next;
252 } 252 }