DEV Community

Discussion on: Hello, bgfx!

Collapse
 
versine profile image
versine

Because he uses memcpy, a null terminator never gets written to the end of the string. You need to allocate with "char* filePath = (char*)calloc(1, shaderLen + fileLen + 1);", then there will be a zero at the end of the string