Libraries: fixed a bug in lib_init functions (#274)

added verification of the second initialization attempt

Reviewed-on: #274
This commit is contained in:
2025-08-02 18:00:18 +02:00
parent e423bfb2d1
commit 8d235ce49b
4 changed files with 409 additions and 395 deletions

View File

@@ -100,6 +100,10 @@ lib_init: ;//////////////////////////////////////////////////////////////////;;
mov [mem.alloc], eax
mov [mem.free], ebx
mov [mem.realloc], ecx
cmp [dll.load], edx
je .ok
mov [dll.load], edx
invoke dll.load, @IMPORT
@@ -115,6 +119,7 @@ lib_init: ;//////////////////////////////////////////////////////////////////;;
invoke ini.get_str, inifile, sec_proxy, key_password, proxyPassword, 256, proxyPassword
popa
.ok:
DEBUGF 1, "HTTP library: init OK\n"
xor eax, eax
ret

View File

@@ -78,6 +78,10 @@ proc lib_init ;///////////////////////////////////////////////////////////////;;
mov [mem.alloc], eax
mov [mem.free], ebx
mov [mem.realloc], ecx
cmp [dll.load], edx
je .ok
mov [dll.load], edx
or edx, edx

View File

@@ -37,6 +37,10 @@ proc libini._.init ;////////////////////////////////////////////////////////////
mov [mem.alloc], eax
mov [mem.free], ebx
mov [mem.realloc], ecx
cmp [dll.load], edx
je .ok
mov [dll.load], edx
invoke dll.load, @IMPORT

View File

@@ -33,7 +33,8 @@ use_ColorDialog
;--------------------------------------------------
align 16
lib_init:
ret
xor eax, eax
ret
;--------------------------------------------------
align 16