aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sam.c b/sam.c
index 6c77861..3eb2d02 100644
--- a/sam.c
+++ b/sam.c
@@ -378,7 +378,7 @@ static char *parse_cmdname(const char **s) {
Buffer buf;
buffer_init(&buf);
- while (isalpha((unsigned char)**s) || **s == '-')
+ while (**s && **s != ' ' && (!ispunct((unsigned char)**s) || **s == '-'))
buffer_append(&buf, (*s)++, 1);
if (buffer_length(&buf))