matus-chochlik / oglplus

OGLplus is a collection of open-source, cross-platform libraries which implement an object-oriented facade over the OpenGL® (version 3 and higher) and also OpenAL® (version 1.1) and EGL (version 1.4) C-language APIs. It provides wrappers which automate resource and object management and make the use of these libraries in C++ safer and more convenient.
http://oglplus.org/
Boost Software License 1.0
491 stars 72 forks source link

load obj: bug and fix #63

Closed ucacaxm closed 10 years ago

ucacaxm commented 10 years ago

hi again,

On windows, obj_mesh.ipp has a bug which run an exception "string iterator not dereferencable" and stop even the exemple_15 at the loading step, because on line 69, your code is return (_i == e) || std::isspace(_i); and it should be return (i == e) || std::isspace(i); since you want to test if the string_iterator i reach the end of the line e. (end of line e which is set to line.end() is not dereferencable).

Removing the *, fix the bug on my windows.

Best and this time good night, alex

matus-chochlik commented 10 years ago

Thanks for catching this. Fixed in the current release branch. Will be merged into develop and master shortly.