From 113240629a26beca6fbacfcd7c99cbcc230dce17 Mon Sep 17 00:00:00 2001 From: Karl-Heinz Reichel Date: Sun, 29 Apr 2018 20:19:11 +0200 Subject: [PATCH] Fix crash in Documentation --- QtSharp/DocGeneration/Documentation.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/QtSharp/DocGeneration/Documentation.cs b/QtSharp/DocGeneration/Documentation.cs index 395bf447..a8b40b9a 100644 --- a/QtSharp/DocGeneration/Documentation.cs +++ b/QtSharp/DocGeneration/Documentation.cs @@ -328,6 +328,10 @@ public void DocumentFunction(Function function) if (function.IsVariadic && @params.Count == i || match.Groups[1].Value == "void") break; var param = csharpSources.SafeIdentifier(match.Groups[1].Value); + + if (i >= @params.Count) { + break; + } @params[i].Name = param; if (function.IsDependent && function is Method && function.Namespace.IsDependent) {