now c:\ do not crash cmd
authorPaolo Pantaleo <paolopan@freemail.it>
Fri, 3 Dec 1999 18:50:00 +0000 (18:50 +0000)
committerPaolo Pantaleo <paolopan@freemail.it>
Fri, 3 Dec 1999 18:50:00 +0000 (18:50 +0000)
svn path=/trunk/; revision=815

rosapps/cmd/where.c

index 21da798..4f18965 100644 (file)
@@ -111,10 +111,21 @@ SearchForExecutable (LPCTSTR pFileName, LPTSTR pFullName)
 #ifdef _DEBUG
                 DebugPrintf (_T("Absolute or relative path is given.\n"));
 #endif
-                GetFullPathName (pFileName,
-                                 MAX_PATH,
-                                 szPathBuffer,
-                                 &pFilePart);
+                
+
+                               
+                               
+                               if (GetFullPathName (pFileName,
+                                                            MAX_PATH,
+                                                                szPathBuffer,
+                                                                    &pFilePart)  ==0)                                                          
+                                       return FALSE;
+
+                               
+                               if(pFilePart == 0)
+                                       return FALSE;
+                               
+
 
                 if (_tcschr (pFilePart, _T('.')) != NULL)
                 {