Skip to content
Snippets Groups Projects
Commit 21be9881 authored by Brad King's avatar Brad King
Browse files

BUG: Fix GetFilenameName to not use uninitialized search position in win32 version.

parent b86efa17
No related branches found
No related tags found
No related merge requests found
...@@ -2507,7 +2507,7 @@ kwsys_stl::string SystemTools::GetFilenamePath(const kwsys_stl::string& filename ...@@ -2507,7 +2507,7 @@ kwsys_stl::string SystemTools::GetFilenamePath(const kwsys_stl::string& filename
kwsys_stl::string SystemTools::GetFilenameName(const kwsys_stl::string& filename) kwsys_stl::string SystemTools::GetFilenameName(const kwsys_stl::string& filename)
{ {
#if defined(_WIN32) #if defined(_WIN32)
kwsys_stl::string::size_type slash_pos = filename.find_last_of("/\\", 0, slash_pos); kwsys_stl::string::size_type slash_pos = filename.find_last_of("/\\");
#else #else
kwsys_stl::string::size_type slash_pos = filename.find_last_of("/"); kwsys_stl::string::size_type slash_pos = filename.find_last_of("/");
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment