OSDN Git Service

Add Reversfind return value check at submodule updater
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / Commands / SubmoduleCommand.cpp
index ca1ea08..69c387b 100644 (file)
@@ -74,7 +74,9 @@ bool SubmoduleCommand::Execute(CString cmd,  CString arg)
        else\r
        {\r
                bkpath=this->orgPathList[0].GetWinPathString();\r
-               bkpath=bkpath.Left(bkpath.ReverseFind(_T('\\')));\r
+               int start = bkpath.ReverseFind(_T('\\'));\r
+               if( start >= 0 )\r
+                       bkpath=bkpath.Left(start);\r
        }\r
 \r
        CString super=g_GitAdminDir.GetSuperProjectRoot( bkpath );\r