Fix loading referenced textures for models at project root;

This commit is contained in:
bjorn 2018-04-04 23:42:15 -07:00
parent 7a309c88ca
commit c59c545198
1 changed files with 1 additions and 0 deletions

View File

@ -135,6 +135,7 @@ static int readMaterialTexture(struct aiMaterial* assimpMaterial, enum aiTexture
strncpy(fullPath, dirname, LOVR_PATH_MAX);
char* lastSlash = strrchr(fullPath, '/');
if (lastSlash) lastSlash[1] = '\0';
else fullPath[0] = '\0';
strncat(fullPath, path, LOVR_PATH_MAX);
normalizePath(fullPath, normalizedPath, LOVR_PATH_MAX);