All pastes #203969 Raw Edit

Unnamed

public text v1 · immutable
#203969 ·published 2006-10-15 15:24 UTC
rendered paste body
Index: gui.c
===================================================================
--- gui.c       (revision 20225)
+++ gui.c       (working copy)
@@ -838,9 +838,11 @@
             char searchpath3[MAX_PATH];
 #endif
             int len, pos = 0, cdromdrive = 0;
+            UINT errmode;
             point.x = GET_X_LPARAM(lParam);
             point.y = GET_Y_LPARAM(lParam);
             ClientToScreen(hWnd, &point);
+            errmode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
             len = GetLogicalDriveStrings(MAX_PATH, device);
             while(pos < len)
             {
@@ -865,6 +867,7 @@
                 }
                 pos += strlen(device + pos) + 1;
             }
+            SetErrorMode(errmode);
             TrackPopupMenu(gui->menu, 0, point.x, point.y, 0, hWnd, NULL);
             return 0;
         }