Skip to content

Commit

Permalink
Merge pull request #150 from credfeto/bugfix/149-index-out-of-range-c…
Browse files Browse the repository at this point in the history
…reating-event-id

#149 - Fixed index out of range issue with negative ids
  • Loading branch information
nblumhardt authored Aug 21, 2019
2 parents 04038d0 + fb572f8 commit 9406664
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ internal static LogEventProperty CreateEventIdProperty(EventId eventId)

if (eventId.Id != 0)
{
if (eventId.Id < LowEventIdValues.Length)
if (eventId.Id >= 0 && eventId.Id < LowEventIdValues.Length)
// Avoid some allocations
properties.Add(LowEventIdValues[eventId.Id]);
else
Expand Down

0 comments on commit 9406664

Please sign in to comment.