Ftpc: Update (#185)

- fix for bugs with buffers 'remote_list_buf', 'buf_buffer2';
- fix stack leak when navigating files;
- change sorting of folders and files, clean code;
- added option to show|hide log;
- icons are taken from @reshare;
- added icons to the 'disconnect' and 'search' buttons.

Reviewed-on: #185
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: IgorA <aie85playm@gmail.com>
Co-committed-by: IgorA <aie85playm@gmail.com>
This commit is contained in:
2025-04-10 18:47:13 +02:00
committed by Max Logaev
parent df0c5d8f48
commit 75b6663ce0
10 changed files with 308 additions and 128 deletions

View File

@@ -190,10 +190,11 @@ data_loop:
mov [filestruct.ptr], buf_buffer2
mov [filestruct.size], eax
push eax
mcall 70, filestruct
mcall SF_FILE, filestruct
test eax, eax
jz @f
call error_fs
add esp, 4 ; fix stack
jmp close_datacon
@@:
pop eax
@@ -204,7 +205,7 @@ data_loop:
; storing, send all data
.stor:
mcall 70, filestruct
mcall SF_FILE, filestruct
cmp eax, 6 ; end of file
je .last_call
test eax, eax ; error
@@ -244,7 +245,7 @@ data_loop:
mov ecx, eax ; eax is size of buffer received
inc ecx
add ecx, [size_fname] ; added old size to form new required size
mcall 68, 20, , [ptr_fname] ; realloc
mcall SF_SYS_MISC, SSF_MEM_REALLOC, , [ptr_fname]
test eax, eax
je error_heap
mov [ptr_fname], eax ; eax contains the new block now