[Lldb-commits] [lldb] r247766 - Fix off-by-one size check.

Chaoren Lin via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 15 18:20:35 PDT 2015


Author: chaoren
Date: Tue Sep 15 20:20:34 2015
New Revision: 247766

URL: http://llvm.org/viewvc/llvm-project?rev=247766&view=rev
Log:
Fix off-by-one size check.

Modified:
    lldb/trunk/source/Expression/IRInterpreter.cpp

Modified: lldb/trunk/source/Expression/IRInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=247766&r1=247765&r2=247766&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRInterpreter.cpp (original)
+++ lldb/trunk/source/Expression/IRInterpreter.cpp Tue Sep 15 20:20:34 2015
@@ -655,7 +655,7 @@ IRInterpreter::Interpret (llvm::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;




More information about the lldb-commits mailing list