Fix ftpc crash

This commit is contained in:
2025-05-18 23:54:26 +05:00
parent c148987224
commit ac1055064d
2 changed files with 7 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
if tup.getconfig("NO_FASM") ~= "" then return end
ROOT = "../../.."
tup.rule("usbcdc.asm", "fasm %f %o " .. tup.getconfig("PESTRIP_CMD") .. tup.getconfig("KPACK_CMD"), "%B.sys")

View File

@@ -470,10 +470,14 @@ gui: ;//////////////////////////////////////////////////////////////////////////
dec edx dec edx
jnz @b jnz @b
inc ecx
lea esi, [edi-1] lea esi, [edi-1]
lea edi, [node_entry2+4] lea edi, [node_entry2+4]
@@: @@:
movsb movsb
dec ecx
; check if the file name is incomplete
jz .store_last_entry
cmp word[esi], 0x0a0d ; end of entry cmp word[esi], 0x0a0d ; end of entry
jne @b jne @b
mov byte[edi], 0 mov byte[edi], 0