From 89b8a8a9216b1d2a14ba7b96238d076126227a8d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 3 Jan 2005 12:27:58 +0000 Subject: [PATCH] Added stripping of trailing spaces to readline call to fix problems associated with eroneous spaces hanging around at ends of lines causing string matching problems --- src/osgPlugins/obj/obj.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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;