kvark / obj

Basic Wavefront OBJ loader
Apache License 2.0
29 stars 12 forks source link

Erroneous zero vertex numbers cause panics #23

Closed elrnv closed 4 years ago

elrnv commented 4 years ago

This PR removes the panics resulting from using zero vertex numbers, which can creep up in user defined obj files. It would be nice if such an obj doesn't bring down the entire application. So instead of panicking on "subtract with overflow" we return an Error with the relevant line number here instead.