summaryrefslogtreecommitdiff
path: root/src/modules/evas/model_loaders/obj
diff options
context:
space:
mode:
authorBogdan Devichev <b.devichev@samsung.com>2015-02-26 20:27:11 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-26 21:06:38 +0100
commit5eba6ae468e884d6e5015578fa3e37b53548c9f1 (patch)
tree00e3ce9ea55edcfff9a5378906b053fc9778fa74 /src/modules/evas/model_loaders/obj
parent179acbdd9b592b62a00a726ecea7d95db5995e97 (diff)
evas-3d: fix incorrect reading of .obj file which had an empty line before data in unix encoding.
Summary: For example of a bug, part of .obj file: vn 0.5536 -0.7200 -0.4185\n vn -0.5536 -0.7200 -0.4185\n \# 239 vertex normals\n \n vt 0.4998 0.2618 0.0000\n(lines like this were ignored) vt 0.5205 0.2550 0.0000\n vt 0.5249 0.2618 0.0000\n @fix Test Plan: Run colorpick example. Before and after this update. ("M15.obj" has fixed places.) Reviewers: cedric, Hermet, raster Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2049 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/modules/evas/model_loaders/obj')
-rw-r--r--src/modules/evas/model_loaders/obj/evas_model_load_obj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/evas/model_loaders/obj/evas_model_load_obj.c b/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
index b88f95b..e1fdf48 100644
--- a/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
+++ b/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
@@ -176,7 +176,7 @@ _count_elements(char *map)//count elements of mesh in .obj
176 } 176 }
177 } 177 }
178 } 178 }
179 else if (*current == '\n') 179 if (*current == '\n')
180 { 180 {
181 will_check_next_char = EINA_TRUE; 181 will_check_next_char = EINA_TRUE;
182 } 182 }
@@ -364,7 +364,7 @@ evas_model_load_file_obj(Evas_3D_Mesh *mesh, Eina_File *file)
364 } 364 }
365 } 365 }
366 } 366 }
367 else if (*current == '\n') 367 if (*current == '\n')
368 { 368 {
369 will_check_next_char = EINA_TRUE; 369 will_check_next_char = EINA_TRUE;
370 } 370 }