Skip to content

Commit

Permalink
fix memleak in FormatFileSizeNoTransTemp()
Browse files Browse the repository at this point in the history
  • Loading branch information
kjk committed Oct 23, 2023
1 parent 3304d11 commit 99f74dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AppTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ TempStr FormatFileSizeTemp(i64 size) {
// as "1.29 MB (1,348,258 Bytes)"
TempStr FormatFileSizeNoTransTemp(i64 size) {
if (size <= 0) {
return str::Format("%d", (int)size);
return str::FormatTemp("%d", (int)size);
}
char* n1 = FormatSizeSuccintNoTransTemp(size);
char* n2 = str::FormatNumWithThousandSepTemp(size);
Expand Down

0 comments on commit 99f74dc

Please sign in to comment.