1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Linux fix

This commit is contained in:
Brian Fiete 2024-03-16 21:17:53 -04:00
parent fe2244fb4b
commit 8f0ba26dd1
3 changed files with 12 additions and 3 deletions

View file

@ -1241,6 +1241,15 @@ public:
((char*)mPtr)[this->mLength] = 0;
}
StringSimple& operator=(const StringView& sv)
{
delete this->mPtr;
this->mPtr = new char[sv.mLength + 1];
this->mLength = sv.mLength;
memcpy((char*)this->mPtr, sv.mPtr, this->mLength);
((char*)this->mPtr)[this->mLength] = 0;
}
~StringSimple()
{
delete this->mPtr;