Sfoglia il codice sorgente

Simplify debugging by resetting error code

Andy Cedilnik 23 anni fa
parent
commit
4fe98d8068
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      Source/cmSystemTools.cxx

+ 1 - 0
Source/cmSystemTools.cxx

@@ -1479,6 +1479,7 @@ bool RunCommandViaWin32(const char* command,
 			int& retVal,
 			int& retVal,
 			bool verbose)
 			bool verbose)
 {
 {
+  ::SetLastError(ERROR_SUCCESS);
   if ( ! command )
   if ( ! command )
     {
     {
     cmSystemTools::Error("No command specified");
     cmSystemTools::Error("No command specified");