| 297 | } |
| 298 | |
| 299 | static char* alloc_string_sized(const char* in, size_t insize) { |
| 300 | char* out = (char*)lodepng_malloc(insize + 1); |
| 301 | if(out) { |
| 302 | lodepng_memcpy(out, in, insize); |
| 303 | out[insize] = 0; |
| 304 | } |
| 305 | return out; |
| 306 | } |
| 307 | |
| 308 | /* dynamically allocates a new string with a copy of the null terminated input text */ |
| 309 | static char* alloc_string(const char* in) { |
no test coverage detected