Hi Biterider!
I have some problems extracting only 1 byte string. With a minor change apparently is working well: invoke StrLengthA, [esp + 8]
; Agregated
inc eax ; 27/09/16
mov ecx, eax
; Replaced
;inc ecx ; 27/09/16
Regards
LATER: not solved at all. But MASM32 szMid make the job until I understand the function (forever? :biggrin:)
Hi HSE
Sorry for the delay, but I was a bit busy. I found a problem when the starting character was the last in the source string. Due to a wrang comparison, the function was aborted returning zero.
Attached the corrected version of the ANSI and the wide string functions. BTW, when the function returns, eax contains the number of chars copied.
Biterider
m2z BYTE ptr [edx] ;Set ZTC
Can you explain what this line does? Just curious.
mov byte ptr [edx], 0
If function fail return a null string.
Hi Biterider
StrMidA working prefectly. Thanks :t