hi
i have a question to remove all 0 from string
example string: 00012345 to 12345
invoke GetDlgItemText,hWnd,1001,addr lpBuffer,9
xor esi,esi
mov ebx,offset lpBuffer
@@:
cmp BYTE PTR [ebx],"0"
jnz @out
inc ebx
inc esi
cmp esi,8
jnz @B
invoke MessageBox,hWnd,addr lpBuffer,0,MB_OK
@out:
greets
ragdog
invoke GetDlgItemText,hWnd,1001,addr lpBuffer,9
xor esi,esi
mov ebx,offset lpBuffer
@@:
cmp BYTE PTR [ebx],"0"
jnz @out
inc ebx
inc esi
cmp esi,8
jnz @B
;small problem if the whole string was only "0" - will get here, but ebx will point 'after' the string.
;you should maybe also check for the terminating-null ;)
@out:
invoke MessageBox,hWnd,ebx,0,MB_OK
thanks for you reply
its a error
example: ist the buffer 00000123
print: 12300000123
sounds like a dirty buffer... debug it and see whats happening?
this problem is solved
thanks