diff --git a/src/NLog.Extensions.Logging/Logging/NLogMessageParameterList.cs b/src/NLog.Extensions.Logging/Logging/NLogMessageParameterList.cs index dd9da4ef..f54e532e 100644 --- a/src/NLog.Extensions.Logging/Logging/NLogMessageParameterList.cs +++ b/src/NLog.Extensions.Logging/Logging/NLogMessageParameterList.cs @@ -179,10 +179,7 @@ public MessageTemplateParameter this[int index] { get { - if (index >= _originalMessageIndex) - index += 1; - - var parameter = _parameterList[index]; + var parameter = _parameterList[index >= _originalMessageIndex ? index + 1 : index]; return _hasComplexParameters ? GetMessageTemplateParameter(parameter.Key, parameter.Value) : new MessageTemplateParameter(parameter.Key, parameter.Value, null, CaptureType.Normal);