instead of assuming png, and returning a bad filename, return false

This commit is contained in:
Glenn Maynard
2006-10-15 03:59:24 +00:00
parent 7962c4c739
commit f0227238a5
2 changed files with 4 additions and 6 deletions
+3 -5
View File
@@ -47,7 +47,7 @@ Actor* ActorUtil::Create( const RString& sClassName, const XNode* pNode, Actor *
return pRet; return pRet;
} }
void ActorUtil::ResolvePath( RString &sPath, const RString &sName ) bool ActorUtil::ResolvePath( RString &sPath, const RString &sName )
{ {
retry: retry:
CollapsePath( sPath ); CollapsePath( sPath );
@@ -72,10 +72,7 @@ retry:
FlushDirCache(); FlushDirCache();
goto retry; goto retry;
case Dialog::ignore: case Dialog::ignore:
asPaths.push_back( sPath ); return false;
if( GetExtension(asPaths[0]) == "" )
asPaths[0] = SetExtension( asPaths[0], "png" );
break;
default: default:
ASSERT(0); ASSERT(0);
} }
@@ -107,6 +104,7 @@ retry:
} }
sPath = DerefRedir( sPath ); sPath = DerefRedir( sPath );
return true;
} }
static void PushParamsTable( Lua *L ) static void PushParamsTable( Lua *L )
+1 -1
View File
@@ -71,7 +71,7 @@ namespace ActorUtil
RString GetWhere( const XNode *pNode ); RString GetWhere( const XNode *pNode );
bool GetAttrPath( const XNode *pNode, const RString &sName, RString &sOut ); bool GetAttrPath( const XNode *pNode, const RString &sName, RString &sOut );
void ResolvePath( RString &sPath, const RString &sName ); bool ResolvePath( RString &sPath, const RString &sName );
void SortByZPosition( vector<Actor*> &vActors ); void SortByZPosition( vector<Actor*> &vActors );