| Author |
| Thread |
 |
|
edfed
Joined: 20 Feb 2006
Posts: 3950
Location: In an open world without walls and fences, we wouldn't need Windows and Gates
|
Replace bug?
given this code
Code: |
|
dd minicube,300,3200,400
dd minicube,300,3200,400
dd minicube,300,3200,400
|
|
when i try to replace 0,400 by 0,400,Blue
only the first line will be replaced. if the first line don't end with 0,400 it will replace nothing at all...
here the gif of the problem: http://fool.codercat.org/fasmreplacebug.gif
tested with the very last version of fasm
it happens with the file uploaded, never saw this bug before.
thanks.
You are not allowed to download the files attached to this post. You may need to log in in order to do so.
_________________  
|
08 Feb 2012, 17:11 |
|
LocoDelAssembly
Your code has a bug
Joined: 06 May 2005
Posts: 4588
Location: Argentina
|
The problem can be more easily seen by just trying to find the following string patterns:
(always without qoutes)
"400" : no problems
",400" : finds the occurrences, but if you open the search dialog again it shows "400" (i.e. it removes the comma)
"0,400" : finds nothing.
By some quick testing, it seems that searches like x,y are converted into y the next time you open the search dialog. The "0,400" and "0,Blu" patterns fail, but "0,4", "0,40", "0,B", "0,Bl" and "0,Blue" all work.
|
08 Feb 2012, 19:02 |
|
edfed
Joined: 20 Feb 2006
Posts: 3950
Location: In an open world without walls and fences, we wouldn't need Windows and Gates
|
tested with:
replace 0,000 by 0,00 OK
Code: |
|
0,000,123
0,000,123
|
|
replace 0,123 by 0,00 OK
replace 0,400 by 0,00 OK
Code: |
|
0,222,400
0,222,400
|
|
replace 2,400 by 0,00 OK
Code: |
|
0,000,400
0,000,400
|
|
replace 0,400 by 0,00 notfound
Code: |
|
0,000,100
0,000,100
|
|
replace 0,100 by 0,00 notfound
Code: |
|
0,222,122
0,222,122
|
|
replace 2,122 by 0,00 not found
Code: |
|
0,222,122
0,222,122
22*2,122
|
|
replace 2.122 by 0,00 Ok, one replace here->*
Code: |
|
;CURSOR position->*
0,22*2,122
0,222,122
|
|
replace 2,122 by 0,00 replace ok, 1 replace
but what is the limit?
|
08 Feb 2012, 20:50 |
|
Tomasz Grysztar
Assembly Artist
Joined: 16 Jun 2003
Posts: 5288
Location: Kraków, Poland
|
Quick fix: in SEARCH.INC find this section
Code: |
|
match_part_of_suffix:
mov eax,[esp]
push ecx esi edi
xchg eax,esi
sub eax,esi
sub ecx,eax
repe cmpsb
pop edi esi ecx
jne suffix_match_shifts_table_done
store_suffix_match_shift:
|
|
and replace "sub ecx,eax" with "add ecx,eax".
I will upload the corrected package later.
|
09 Feb 2012, 15:45 |
|
edfed
Joined: 20 Feb 2006
Posts: 3950
Location: In an open world without walls and fences, we wouldn't need Windows and Gates
|
thank you so much 
|
09 Feb 2012, 22:40 |
|
|
|
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 cannot download files in this forum
|
|
|
|
|
|
Powered by phpBB © 2001-2005 phpBB Group.
|