diff --git a/src/osgPlugins/obj/obj.cpp b/src/osgPlugins/obj/obj.cpp index 4983e9717..eb1cc9e9c 100644 --- a/src/osgPlugins/obj/obj.cpp +++ b/src/osgPlugins/obj/obj.cpp @@ -88,6 +88,13 @@ bool Model::readline(std::istream& fin, char* line, const int LINE_SIZE) } + + // strip trailing spaces + while (ptr>line && *(ptr-1)==' ') + { + --ptr; + } + *ptr = 0; return true;