Skip to content

Commit

Permalink
Merge pull request #49 from u3d-community/fix-deleting-String-endZero
Browse files Browse the repository at this point in the history
Do not delete String::endZero
  • Loading branch information
klaussilveira authored Jun 13, 2023
2 parents 21f1df6 + d69a08d commit d48ef39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Urho3D/Container/Str.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class URHO3D_API String
/// Destruct.
~String()
{
if (capacity_)
if (capacity_ && buffer_ != &endZero)
delete[] buffer_;
}

Expand Down

0 comments on commit d48ef39

Please sign in to comment.