}
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);
// 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.