OSDN Git Service

Correct an entry-point look-up logic defect.
authorKeith Marshall <keith@users.osdn.me>
Tue, 25 May 2021 14:28:11 +0000 (15:28 +0100)
committerKeith Marshall <keith@users.osdn.me>
Tue, 25 May 2021 14:28:11 +0000 (15:28 +0100)
w32api/ChangeLog
w32api/lib/availapi.c

index ec156e7..f2e34d6 100644 (file)
@@ -1,3 +1,10 @@
+2021-05-25  Keith Marshall  <keith@users.osdn.me>
+
+       Correct an entry-point look-up logic defect.
+
+       * lib/availapi.c (__bound_dll_entry_point) [dll == NULL]: Should be...
+       [dll != NULL]: ...this; correct it.
+
 2021-05-23  Keith Marshall  <keith@users.osdn.me>
 
        Implement a generic legacy platform support infrastructure.
index 0c899ac..dafd790 100644 (file)
@@ -118,7 +118,7 @@ void *__bound_dll_entry_point
      * the entry-point, or mark it as permanently unsupported.
      */
     HMODULE dll = GetModuleHandleA( dllname );
-    hook = (dll == NULL) ? GetProcAddress( dll, procname ) : API_UNSUPPORTED;
+    hook = (dll != NULL) ? GetProcAddress( dll, procname ) : API_UNSUPPORTED;
   }
   /* In any case, we return the (possibly updated) hook, which should
    * then be recorded by the caller.