[vlc-commits] win32: tolerate extra error flags on Vista
    Rémi Denis-Courmont 
    git at videolan.org
       
    Sat Aug  8 20:33:54 CEST 2015
    
    
  
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug  8 21:30:00 2015 +0300| [ddbe9dc37c496bbd38fe4f8e104a0b459d1bf2dd] | committer: Rémi Denis-Courmont
win32: tolerate extra error flags on Vista
This should not adversely affect LibVLC: more errors cases will lead to
error code returns instead of abnormal termination. It is not strictly
semantically correct though (update to Win7 or above if you care).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ddbe9dc37c496bbd38fe4f8e104a0b459d1bf2dd
---
 src/win32/plugin.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/win32/plugin.c b/src/win32/plugin.c
index 3024f3d..ac9ea0a 100644
--- a/src/win32/plugin.c
+++ b/src/win32/plugin.c
@@ -57,7 +57,8 @@ static BOOL WINAPI SetThreadErrorModeFallback(DWORD mode, DWORD *oldmode)
     if (GetErrorModeReal != NULL)
         curmode = GetErrorModeReal();
 # endif
-    if ((mode & SEM_FAILCRITICALERRORS) != (curmode & SEM_FAILCRITICALERRORS))
+    /* Extra flags should be OK. Missing flags are NOT OK. */
+    if ((mode & curmode) != mode)
         return FALSE;
     if (oldmode != NULL)
         *oldmode = curmode;
    
    
More information about the vlc-commits
mailing list