From 3999a16a1acbb8f81df15e87b5f8d6020ba0f4e9 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 27 Jun 2016 15:22:10 +0100 Subject: [PATCH] Added handling of return value --- src/osgPlugins/obj/obj.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/obj/obj.cpp b/src/osgPlugins/obj/obj.cpp index 0f7cd4f98..e2038f60a 100644 --- a/src/osgPlugins/obj/obj.cpp +++ b/src/osgPlugins/obj/obj.cpp @@ -797,7 +797,14 @@ bool Model::readOBJ(std::istream& fin, const osgDB::ReaderWriter::Options* optio { int smoothingGroup=0; if (strncmp(line+2,"off",3)==0) smoothingGroup = 0; - else sscanf(line+2,"%d",&smoothingGroup); + else + { + int result = sscanf(line+2,"%d",&smoothingGroup); + if (result!=1) + { + OSG_NOTICE <<"*** error reading smoothing group ***"<