X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Flexer%2Fcommand-name.c;h=24443a0995b814c7d30e60c123b8924d14a7e5b8;hb=e80c032386b6524fe760efc6f10bd9adb8a6ac20;hp=8ef64d9f25754bfe9a5ddd846e632dc545fcc5bf;hpb=fe8dc2171009e90d2335f159d05f7e6660e24780;p=pspp diff --git a/src/language/lexer/command-name.c b/src/language/lexer/command-name.c index 8ef64d9f25..24443a0995 100644 --- a/src/language/lexer/command-name.c +++ b/src/language/lexer/command-name.c @@ -60,7 +60,7 @@ find_word (struct substring *s, struct substring *word) } else if (c_isdigit (c)) { - while (c_isdigit (s->string[ofs])) + while (ofs < s->length && c_isdigit (s->string[ofs])) ofs++; } ss_get_bytes (s, ofs, word);