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

Expanding support for params in delegates, params tuple support

This commit is contained in:
Brian Fiete 2025-02-16 11:36:14 -08:00
parent 4b660b2314
commit 421cace017
11 changed files with 203 additions and 59 deletions

View file

@ -551,10 +551,12 @@ protected:
if ((mAllocSizeAndFlags & AttrFlags) == StrPtrFlag)
{
// It's a reference
char* newPtr = AllocPtr(this->mLength);
memcpy(newPtr, this->mPtr, this->mLength + 1);
int allocSize = (int)BF_MAX(GetAllocSize(), this->mLength + 1);
char* newPtr = AllocPtr(allocSize);
memcpy(newPtr, this->mPtr, this->mLength);
newPtr[this->mLength] = 0;
this->mPtr = newPtr;
mAllocSizeAndFlags = this->mLength | DynAllocFlag | StrPtrFlag;
mAllocSizeAndFlags = allocSize | DynAllocFlag | StrPtrFlag;
}
}