Fixed a bug with interactive_t's arg validation

This commit is contained in:
John Wiegley 2009-02-21 21:58:53 -04:00
parent c6d2420d09
commit 018c812fda

View file

@ -156,7 +156,7 @@ void interactive_t::verify_arguments() const
"Expected " << label << " for argument " << offset
<< ", but received " << vlabel);
}
else if (! optional && ! next_arg) {
else if (*p && ! optional && ! next_arg) {
throw_(std::logic_error, "Too few arguments to function");
}
else if (! *p && next_arg) {