Skip to content

Commit

Permalink
Fix: A potential bug in Win32WindowHelper.cs (#1564)
Browse files Browse the repository at this point in the history
Modify the code to avoid potential problems(in
'WinUIGallery/Helper/Win32WindowHelper.cs')

## Description
max may have been incorrectly written as min in the code

## Motivation and Context
By analyzing the code, it can be inferred that there might be a problem
here.

## How Has This Been Tested?
Manual test

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
  • Loading branch information
Paper-Scallion committed Jul 19, 2024
1 parent 935fbbe commit 116e48b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WinUIGallery/Helper/Win32WindowHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private nint WndProc(nint hWnd, WindowMessage Msg, nint wParam, nint lParam)
if (maxWindowSize != null)
{
minMaxInfo.ptMaxTrackSize.x = (int)(maxWindowSize.Value.x * scalingFactor);
minMaxInfo.ptMaxTrackSize.y = (int)(minWindowSize.Value.y * scalingFactor);
minMaxInfo.ptMaxTrackSize.y = (int)(maxWindowSize.Value.y * scalingFactor);
}

Marshal.StructureToPtr(minMaxInfo, lParam, true);
Expand Down

0 comments on commit 116e48b

Please sign in to comment.