From 54dc21e7d21fc3f123b5a7c79acf54cdc9782826 Mon Sep 17 00:00:00 2001 From: triton Date: Sun, 25 Aug 2013 16:12:49 +0100 Subject: [PATCH] Fixed parsing of function code gen info to be more robust. --- src/Parser/Parser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Parser/Parser.cpp b/src/Parser/Parser.cpp index f70036fe..1917d65e 100644 --- a/src/Parser/Parser.cpp +++ b/src/Parser/Parser.cpp @@ -1621,6 +1621,8 @@ void Parser::WalkFunction(clang::FunctionDecl* FD, CppSharp::AST::Function^ F, // Skip the first argument as it's the return type. if (I == CGInfo.arg_begin()) continue; + if (Index >= F->Parameters->Count) + continue; F->Parameters[Index++]->IsIndirect = I->info.isIndirect(); } }