Fix off-by-one size check.

llvm-svn: 247766
This commit is contained in:
Chaoren Lin 2015-09-16 01:20:34 +00:00
parent 938d701fad
commit 3ca7a3eb41
1 changed files with 1 additions and 1 deletions

View File

@ -655,7 +655,7 @@ IRInterpreter::Interpret (llvm::Module &module,
ai != ae;
++ai, ++arg_index)
{
if (args.size() < static_cast<size_t>(arg_index))
if (args.size() <= static_cast<size_t>(arg_index))
{
error.SetErrorString ("Not enough arguments passed in to function");
return false;