@open issue with dgen fixed

This commit is contained in:
2026-02-24 11:13:06 +02:00
parent f9425f5bd0
commit 7534d522ba
3 changed files with 39 additions and 0 deletions

View File

@@ -107,6 +107,7 @@ __section @CODE ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
mov [s_search.size],ecx
rep movsb
strip_quotes @PARAMS
cmp byte[@PARAMS],0
jz no_params

View File

@@ -613,3 +613,40 @@ EVM_STACK2 = 1000000000b
EVM_MOUSE_FILTER = 0x80000000
EVM_CURSOR_FILTER = 0x40000000
macro strip_quotes buffer {
local .done
local .shift
local .find_end
push eax esi edi
mov edi, buffer
cmp byte [edi], '"'
jne .done
;; shift string left by 1 to remove first quote
mov esi, edi
inc esi
.shift:
mov al, [esi]
mov [edi], al
inc esi
inc edi
test al, al
jnz .shift
;; now find the last quote (if any) and nullify it
mov edi, buffer
.find_end:
mov al, [edi]
test al, al
jz .done
cmp al, '"'
jne @f
mov byte [edi], 0
jmp .done
@@:
inc edi
jmp .find_end
.done:
pop edi esi eax
}

View File

@@ -47,6 +47,7 @@ START:
invoke sort.START, 1
strip_quotes __params
mov ecx, 1 ; for 15.4: 1 = tile
cmp word[__params], '\T'
jz set_bgr