Horde3D

Next-Generation Graphics Engine
It is currently 24.11.2024, 08:14

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: bug in ColladaConv
PostPosted: 09.06.2012, 14:26 
Offline

Joined: 09.06.2012, 14:21
Posts: 12
revision 336 introduced at least one bug:

main.cpp line 172:
Code:
else if( _stricmp( arg.c_str(), "anim" ) == 0 ) assetType = AssetTypes::Animation;


should be:
Code:
else if( _stricmp( argv[i], "anim" ) == 0 ) assetType = AssetTypes::Animation;


Top
 Profile  
Reply with quote  
 Post subject: Re: bug in ColladaConv
PostPosted: 10.06.2012, 21:18 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Thanks fixed it!


Top
 Profile  
Reply with quote  
 Post subject: Re: bug in ColladaConv
PostPosted: 13.06.2012, 08:28 
Offline

Joined: 17.11.2009, 17:00
Posts: 205
Location: Russia, Moscow
Is it really so?
Code:
std::string arg = argv[i];
arg.erase(remove_if(arg.begin(), arg.end(), isspace), arg.end());


if( _stricmp( arg.c_str(), "-type" ) == 0 && argc > i + 1 )
{
   if( _stricmp( argv[++i], "model" ) == 0 ) assetType = AssetTypes::Model;
   else if( _stricmp( argv[i], "anim" ) == 0 ) assetType = AssetTypes::Animation;
   else assetType = AssetTypes::Unknown;
}


Isn't arg.c_str() just cleaned argv[i]? Shouldn't it be
Code:
else if( _stricmp( argv[++i], "anim" ) == 0 ) assetType = AssetTypes::Animation;

like with model?


Top
 Profile  
Reply with quote  
 Post subject: Re: bug in ColladaConv
PostPosted: 13.06.2012, 09:50 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Without watching deeply into the collada converter documentation I thought you specify the type with the argument after -type. So we check the argument after argv[i] (=arg).
The first check argv[++i] increases i already and checks against model, then we check argv[i] again (it has been increased already in the if case) against anim. So I guess swx is right.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group