projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some variables are ordinal.
[pspp]
/
src
/
language
/
lexer
/
command-name.c
diff --git
a/src/language/lexer/command-name.c
b/src/language/lexer/command-name.c
index 8ef64d9f25754bfe9a5ddd846e632dc545fcc5bf..eae0b43b39d3d89d059f417b6c754d4f38ced840 100644
(file)
--- 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))
{
}
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);
ofs++;
}
ss_get_bytes (s, ofs, word);
@@
-132,7
+132,7
@@
command_match (struct substring command, struct substring string,
// Try each possible command.
command_matcher_init (&cm, string);
// Try each possible command.
command_matcher_init (&cm, string);
- for (cmd = commands; cmd < &commands[
command_cnt
]; cmd++)
+ for (cmd = commands; cmd < &commands[
n_commands
]; cmd++)
command_matcher_add (&cm, cmd->name, cmd);
// Get the result.
command_matcher_add (&cm, cmd->name, cmd);
// Get the result.