MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / GetWithSize

Method GetWithSize

core/logic/stringutil.cpp:380–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378 free(buffer);
379 }
380 char* GetWithSize(size_t len)
381 {
382 if (len > max_size)
383 {
384 auto *newbuffer = static_cast<char *>(realloc(buffer, len));
385 if (!newbuffer)
386 return nullptr;
387
388 buffer = newbuffer;
389 max_size = len;
390 }
391 return buffer;
392 }
393};
394
395static char g_formatbuf[2048];

Callers 1

InternalFormatFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected