Skip to content

Commit

Permalink
fix string-limit in stores
Browse files Browse the repository at this point in the history
  • Loading branch information
pionere committed Jul 27, 2024
1 parent f8be5a4 commit cf05f8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/stores.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ void PrintSString(int x, int y, bool cjustflag, const char* str, BYTE col, int v
sx = (gbWidePanel ? LTPANEL_X + 7 : STORE_PNL_X + 7) + x;
sy = LTPANEL_Y + 20 + y * 12 + stextlines[y]._syoff;
limit = gbWidePanel ? LTPANEL_WIDTH - 7 * 2 : STPANEL_WIDTH - 7 * 2;
limit -= x;
if (cjustflag) {
// assert(x == 0); -- otherwise limit -= x; ?
width = GetSmallStringWidth(str);
if (width < limit) {
sx += (limit - width) >> 1;
Expand Down

0 comments on commit cf05f8b

Please sign in to comment.