File tree Expand file tree Collapse file tree
Core/GameEngineDevice/Source/W3DDevice/GameClient/Water Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -958,15 +958,13 @@ void WaterTracksRenderSystem::saveTracks()
958958 return ;
959959
960960 AsciiString fileName=TheTerrainLogic->getSourceFilename ();
961- char path[256 ];
962-
963- strlcpy (path, fileName.str (), ARRAY_SIZE (path));
964- strlcat (path, " .wak" , ARRAY_SIZE (path));
961+ FileSystem::removeExtension (fileName);
962+ fileName.concat (" .wak" );
965963
966964 WaterTracksObj *umod;
967965 Int trackCount=0 ;
968966
969- FILE *fp=fopen (path, " wb" );
967+ FILE *fp=fopen (fileName. str (), " wb" );
970968
971969 if (fp)
972970 {
@@ -994,12 +992,10 @@ void WaterTracksRenderSystem::loadTracks()
994992 return ;
995993
996994 AsciiString fileName=TheTerrainLogic->getSourceFilename ();
997- char path[256 ];
998-
999- strlcpy (path, fileName.str (), ARRAY_SIZE (path));
1000- strlcat (path, " .wak" , ARRAY_SIZE (path));
995+ FileSystem::removeExtension (fileName);
996+ fileName.concat (" .wak" );
1001997
1002- File *file = TheFileSystem->openFile (path , File::READ | File::BINARY);
998+ File *file = TheFileSystem->openFile (fileName. str () , File::READ | File::BINARY);
1003999 WaterTracksObj *umod;
10041000 Int trackCount=0 ;
10051001 Int flipU=0 ;
You can’t perform that action at this time.
0 commit comments