programs/dll.inc: fix inverted Link result check in dll.Load
Build system / Check kernel codestyle (pull_request) Successful in 1m26s
Build system / Build (pull_request) Successful in 10m57s

The inline dll.Link in this file returns the export-table pointer
(non-zero) on success and 0 if any import is unresolved - opposite
contract from the library-side dll.Link. The jnz .fail check after
dll.Link inverted that contract, so every successfully linked
library was reported as a failure, breaking all consumers of
programs/dll.inc.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-04 08:40:22 +03:00
parent 8b33d9c403
commit eb022fef9e
+1 -1
View File
@@ -18,7 +18,7 @@ proc dll.Load, import_table:dword
jz .fail
stdcall dll.Link, eax, edx
test eax, eax
jnz .fail
jz .fail
pop esi
add esi, 8
jmp .next_lib