Alexandre Julliard : winecfg: Don' t crash when DllOverrides contain invalid values.

Alexandre Julliard julliard at winehq.org
Wed May 19 10:34:15 CDT 2010


Module: wine
Branch: master
Commit: fa4d3becf65575194f375a74640de8e8d2ed6e2b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fa4d3becf65575194f375a74640de8e8d2ed6e2b

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed May 19 11:26:29 2010 +0200

winecfg: Don't crash when DllOverrides contain invalid values.

---

 programs/winecfg/libraries.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/programs/winecfg/libraries.c b/programs/winecfg/libraries.c
index 19504d6..e402b4e 100644
--- a/programs/winecfg/libraries.c
+++ b/programs/winecfg/libraries.c
@@ -136,7 +136,7 @@ static const char* mode_to_string(enum dllmode mode)
         case NATIVE_BUILTIN: return "native,builtin";
         case BUILTIN_NATIVE: return "builtin,native";
         case DISABLE: return "";
-        default: assert(FALSE); return "";
+        default: return "";
     }
 }
 
@@ -153,7 +153,7 @@ static const char* mode_to_label(enum dllmode mode)
     case NATIVE_BUILTIN: id = IDS_DLL_NATIVE_BUILTIN; break;
     case BUILTIN_NATIVE: id = IDS_DLL_BUILTIN_NATIVE; break;
     case DISABLE: id = IDS_DLL_DISABLED; break;
-    default: assert(FALSE);
+    default: return "??";
     }
     if (!LoadStringA( GetModuleHandleA(NULL), id, buffer, sizeof(buffer) )) buffer[0] = 0;
     return buffer;
@@ -183,7 +183,7 @@ static DWORD mode_to_id(enum dllmode mode)
         case NATIVE_BUILTIN: return IDC_RAD_NATIVE_BUILTIN;
         case BUILTIN_NATIVE: return IDC_RAD_BUILTIN_NATIVE;
         case DISABLE: return IDC_RAD_DISABLE;
-        default: assert( FALSE ); return 0; /* should not be reached  */
+        default: return IDC_RAD_BUILTIN_NATIVE;
     }
 }
 




More information about the wine-cvs mailing list