summaryrefslogtreecommitdiff
path: root/src/pal/src/loader/module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/src/loader/module.cpp')
-rw-r--r--src/pal/src/loader/module.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/pal/src/loader/module.cpp b/src/pal/src/loader/module.cpp
index 63a65ffb61..bbe8b9ddcc 100644
--- a/src/pal/src/loader/module.cpp
+++ b/src/pal/src/loader/module.cpp
@@ -280,6 +280,16 @@ GetProcAddress(
module = (MODSTRUCT *) hModule;
+ /* try to assert on attempt to locate symbol by ordinal */
+ /* this can't be an exact test for HIWORD((DWORD)lpProcName) == 0
+ because of the address range reserved for ordinals contain can
+ be a valid string address on non-Windows systems
+ */
+ if ((DWORD_PTR)lpProcName < VIRTUAL_PAGE_SIZE)
+ {
+ ASSERT("Attempt to locate symbol by ordinal?!\n");
+ }
+
/* parameter validation */
if ((lpProcName == nullptr) || (*lpProcName == '\0'))
@@ -295,16 +305,6 @@ GetProcAddress(
SetLastError(ERROR_INVALID_HANDLE);
goto done;
}
-
- /* try to assert on attempt to locate symbol by ordinal */
- /* this can't be an exact test for HIWORD((DWORD)lpProcName) == 0
- because of the address range reserved for ordinals contain can
- be a valid string address on non-Windows systems
- */
- if ((DWORD_PTR)lpProcName < VIRTUAL_PAGE_SIZE)
- {
- ASSERT("Attempt to locate symbol by ordinal?!\n");
- }
// Get the symbol's address.