projects
/
platform
/
upstream
/
assimp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa733d6
)
Return exception when obj file contains invalid face indice
author
Alexandre Avenel
<avenel.alexandre@gmail.com>
Sat, 21 Oct 2017 18:36:43 +0000
(20:36 +0200)
committer
Alexandre Avenel
<avenel.alexandre@gmail.com>
Sat, 21 Oct 2017 18:58:00 +0000
(20:58 +0200)
code/ObjFileParser.cpp
patch
|
blob
|
history
diff --git
a/code/ObjFileParser.cpp
b/code/ObjFileParser.cpp
index
acf275b
..
4b203a8
100644
(file)
--- a/
code/ObjFileParser.cpp
+++ b/
code/ObjFileParser.cpp
@@
-475,7
+475,11
@@
void ObjFileParser::getFace( aiPrimitiveType type ) {
} else {
reportErrorTokenInFace();
}
+ } else {
+ //On error, std::atoi will return 0 which is not a valid value
+ throw DeadlyImportError("OBJ: Invalid face indice");
}
+
}
m_DataIt += iStep;
}