Adjusted scanf results checking to correct value, fixing the loading of models without set normals.

This commit is contained in:
Foxar
2021-04-19 11:19:18 +02:00
parent 7b3a28065b
commit b0ae873a88
+1 -1
View File
@@ -88,7 +88,7 @@ void ObjLoader::load(MeshFrame *o_result, char *t_filename, float t_scale, u8 t_
} }
break; break;
/** Loaded only two digits (V, VT) succesfuly. Not setting VN. */ /** Loaded only two digits (V, VT) succesfuly. Not setting VN. */
case 2: case 3:
{ {
fscanf(file, "%d/%d/ %d/%d/ %d/%d/\n", fscanf(file, "%d/%d/ %d/%d/ %d/%d/\n",
&vertexIndex[0], &coordIndex[0], &vertexIndex[0], &coordIndex[0],