MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / string_resize

Function string_resize

src/lodepng.cpp:278–287  ·  view source on GitHub ↗

returns 1 if success, 0 if failure ==> nothing done*/

Source from the content-addressed store, hash-verified

276#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
277/*returns 1 if success, 0 if failure ==> nothing done*/
278static unsigned string_resize(char** out, size_t size)
279{
280 char* data = (char*)lodepng_realloc(*out, size + 1);
281 if(data)
282 {
283 data[size] = 0; /*null termination char*/
284 *out = data;
285 }
286 return data != 0;
287}
288
289/*init a {char*, size_t} pair for use as string*/
290static void string_init(char** out)

Callers 2

string_initFunction · 0.85
string_setFunction · 0.85

Calls 1

lodepng_reallocFunction · 0.85

Tested by

no test coverage detected