Bug 461754 - Wrong error handling in nsMIMEInfoWin.cpp; r=benjamin
authorAiko <Seno.Aiko@live.com>
Wed, 29 Oct 2008 03:48:00 +0100
changeset 21032 0065966a40acaf977bd136bd5a2bb4b004855e84
parent 21031 039a107a3cecaf899ad527681d50921ba35dd812
child 21033 cb300cc32f233c2042123b800c577683be811896
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbenjamin
bugs461754
milestone1.9.1b2pre
Bug 461754 - Wrong error handling in nsMIMEInfoWin.cpp; r=benjamin
uriloader/exthandler/win/nsMIMEInfoWin.cpp
--- a/uriloader/exthandler/win/nsMIMEInfoWin.cpp
+++ b/uriloader/exthandler/win/nsMIMEInfoWin.cpp
@@ -118,21 +118,21 @@ nsMIMEInfoWin::LaunchWithFile(nsIFile* a
 
         // executable is rundll32, everything else is a list of parameters, 
         // including the dll handler.
         nsCOMPtr<nsILocalFile> locFile(do_QueryInterface(aFile));
 
         if (!GetDllLaunchInfo(executable, locFile, args, PR_FALSE))
           return NS_ERROR_INVALID_ARG;
 
-        PRUint32 result = (PRUint32)
+        int result = (int)
           ::ShellExecuteW(NULL, NULL, L"rundll32.exe", args.get(),
                           NULL, SW_SHOWNORMAL);
         // Returns a value greater than 32 if successful. See msdn.
-        if (result >= 32)
+        if (result > 32)
           return NS_OK;
 
         switch (result) {
           case 0:
           case SE_ERR_OOM:
             return NS_ERROR_OUT_OF_MEMORY;
           case ERROR_FILE_NOT_FOUND:
             return NS_ERROR_FILE_NOT_FOUND;