Added handling of return type

This commit is contained in:
Robert Osfield 2016-07-02 12:39:06 +01:00
parent 5beb15fa77
commit 143d423d1f

View File

@ -77,7 +77,11 @@ osgDB::ReaderWriter::ReadResult ReaderWriterTXP::local_readNode(const std::strin
{ {
int x,y,lod; int x,y,lod;
unsigned int id; unsigned int id;
sscanf(name.c_str(),"tile%d_%dx%d_%u",&lod,&x,&y,&id); if (sscanf(name.c_str(),"tile%d_%dx%d_%u",&lod,&x,&y,&id)!=4)
{
return ReadResult::ERROR_IN_READING_FILE;
}
osg::ref_ptr< TXPArchive > archive = getArchive(id,osgDB::getFilePath(file)); osg::ref_ptr< TXPArchive > archive = getArchive(id,osgDB::getFilePath(file));
if (archive == NULL) if (archive == NULL)
return ReadResult::ERROR_IN_READING_FILE; return ReadResult::ERROR_IN_READING_FILE;