Skip to content

Commit

Permalink
fix: discard Origin() calculation if OriginLength is smaller than zero
Browse files Browse the repository at this point in the history
  • Loading branch information
LSViana committed Dec 3, 2023
1 parent 068d867 commit 63fa300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion YDotNet/Native/UndoManager/Events/UndoEventNative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal struct UndoEventNative

public byte[]? Origin()
{
if (OriginHandle == nint.Zero || OriginLength == 0)
if (OriginHandle == nint.Zero || OriginLength <= 0)
{
return null;
}
Expand Down

0 comments on commit 63fa300

Please sign in to comment.