Skip to content

Commit

Permalink
Fix SUI crash when image alignment not centered (#18481)
Browse files Browse the repository at this point in the history
ConvergedAlignment stores vertical alignment to 0xF0 and horizontal
alignment to 0x0F. These were accidentally backwards!

Closes #18479
  • Loading branch information
carlos-zamora authored Jan 30, 2025
1 parent 8a806e0 commit 4da527c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cascadia/TerminalSettingsEditor/Appearances.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
else
{
// Append vertical alignment to the resource key
switch (alignment & static_cast<ConvergedAlignment>(0x0F))
switch (alignment & static_cast<ConvergedAlignment>(0xF0))
{
case ConvergedAlignment::Vertical_Bottom:
alignmentResourceKey = alignmentResourceKey + L"Bottom";
Expand All @@ -938,7 +938,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
}

// Append horizontal alignment to the resource key
switch (alignment & static_cast<ConvergedAlignment>(0xF0))
switch (alignment & static_cast<ConvergedAlignment>(0x0F))
{
case ConvergedAlignment::Horizontal_Left:
alignmentResourceKey = alignmentResourceKey + L"Left";
Expand Down

0 comments on commit 4da527c

Please sign in to comment.