News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Comments on Replacement for Iczelion's a2dw algorithm in the MASM32 library.

Started by dedndave, January 28, 2013, 01:14:20 PM

Previous topic - Next topic

dedndave

just noticed something about that code
if you call it with a pointer to a null string...
    mov edx, [esp+4]
    xor ecx, ecx
    movzx eax, BYTE PTR [edx]
    test eax, eax
    jz quit
;
;
  quit:
    lea eax, [ecx]
    ret 4

you probably meant to branch to the RET 4

my bad - it doesn't crash - just noticed it's an LEA   :P

hutch--

 :P

> you probably meant to branch to the RET 4

No, as a matter of fact I really DID intend to use the LEA.

dedndave

not that it really matters, but eax is already 0
no need in optimizing the exception, though   :P