flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > [BUG] Unicode strings not aligned by pushd

Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17664
Location: In your JS exploiting you and your system
revolution
Unicode strings not aligned by pushd when multiple string parts used.

The second string in this code is not aligned.
Code:
include 'win32wx.inc'

.code

begin:
  align 2
     stdcall is_it_aligned,'Some text'
 align 2
     stdcall is_it_aligned,<'Some more text',13,10>
      invoke  ExitProcess,0

proc is_it_aligned parameter
   test    [parameter],1
       jnz     .not_aligned
        invoke  MessageBox,0,[parameter],'Aligned Okay',0
 ret
    .not_aligned:
        invoke  MessageBox,0,[parameter],'Not Aligned',0
  ret
endp

.end begin    

_________________________________________________________________________

We can fix this in WIN32WX.INC. At line 71:
Code:
macro pushd value
{ match first=,more, value \{ \local ..continue
         times 1 - (rva $ and 1) nop ;<<<----- add this line
   call ..continue
;...    
WIN32WXP.INC has the same problem.
Post 31 Jul 2010, 04:02
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.