[Smipl-devel] SF.net SVN: smipl:[21] smipl-devel/Console.h
Brought to you by:
the_student
From: <the...@us...> - 2009-08-02 00:16:01
|
Revision: 21 http://smipl.svn.sourceforge.net/smipl/?rev=21&view=rev Author: the_student Date: 2009-08-01 23:02:14 +0000 (Sat, 01 Aug 2009) Log Message: ----------- Fixed crash Modified Paths: -------------- smipl-devel/Console.h Modified: smipl-devel/Console.h =================================================================== --- smipl-devel/Console.h 2009-08-01 12:49:19 UTC (rev 20) +++ smipl-devel/Console.h 2009-08-01 23:02:14 UTC (rev 21) @@ -52,8 +52,7 @@ else cout<<"Help not found!"<<endl; } else { - str=new char[strlen(command.argv[1])+strlen("/Help/")]; - strtoupper(command.argv[1]); + //strtoupper(command.argv[1]); str=strdup("/Help/",command.argv[1]); if(PHYSFS_exists(str))PrintFile(str); else cout<<"Help for "<<command.argv[1]<<" not found!"<<endl; @@ -62,20 +61,19 @@ continue; } if(!stricmp(command.argv[0], "ABOUT")) { - if(command.argc==1) { - if(PHYSFS_exists("/About/About"))PrintFile("/About/About"); + if(command.argc==1){ + if(PHYSFS_exists("/About/About")) PrintFile("About"); else cout<<"About not found!"<<endl; - } - else { - str=new char[strlen(command.argv[1])+strlen("/About/")]; - strtoupper(command.argv[1]); + } + else { + //strtoupper(command.argv[1]); str=strdup("/About/",command.argv[1]); - if(PHYSFS_exists(command.argv[1]))PrintFile(str); + if(PHYSFS_exists(str))PrintFile(str); else cout<<"About "<<command.argv[1]<<" not found!"<<endl; delete[]str; - } + } continue; - } + } if(!stricmp(command.argv[0], "REINIT")) { DeInit(); Init(argc,argv); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |