4.26 beta

This commit is contained in:
Igor Pavlov
2005-08-05 00:00:00 +00:00
committed by Kornel Lesiński
parent af1fe52701
commit 31e7b924e8
56 changed files with 2185 additions and 188 deletions

View File

@@ -12,6 +12,11 @@ void SzByteBufferInit(CSzByteBuffer *buffer)
int SzByteBufferCreate(CSzByteBuffer *buffer, size_t newCapacity, void * (*allocFunc)(size_t size))
{
buffer->Capacity = newCapacity;
if (newCapacity == 0)
{
buffer->Items = 0;
return 1;
}
buffer->Items = (Byte *)allocFunc(newCapacity);
return (buffer->Items != 0);
}