Skip to content

Commit

Permalink
Fix write int in StringBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
K0R0L committed Nov 7, 2024
1 parent 1c9a9f5 commit 485dcb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions DesktopEditor/common/StringBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -682,9 +682,10 @@ namespace NSStringUtils
}
if (val < 0)
{
val = -val;
if (val < 0)
if (val == -2147483648)
val = 2147483647;
else
val = -val;

*m_pDataCur++ = (wchar_t)'-';
++m_lSizeCur;
Expand Down

0 comments on commit 485dcb5

Please sign in to comment.