bugfixes in tinypad related to max line size increment

git-svn-id: svn://kolibrios.org@1008 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2009-01-29 11:02:16 +00:00
parent a03f69b310
commit 0671064716
2 changed files with 7 additions and 6 deletions

View File

@ -108,10 +108,10 @@ proc search
mov ecx,[cur_editor.Caret.Y] mov ecx,[cur_editor.Caret.Y]
mov edx,ecx mov edx,ecx
call get_line_offset call get_line_offset
cmp word[esi],0 cmp [esi+EDITOR_LINE_DATA.Size],0
je .exit je .exit
call get_real_length call get_real_length
add esi,4 add esi,sizeof.EDITOR_LINE_DATA
or eax,eax or eax,eax
jz .end_line.2 jz .end_line.2
mov ecx,eax mov ecx,eax
@ -156,7 +156,7 @@ proc search
mov [cur_editor.Caret.Y],edx mov [cur_editor.Caret.Y],edx
mov [cur_editor.SelStart.Y],edx mov [cur_editor.SelStart.Y],edx
mov ecx,edx mov ecx,edx
lea eax,[esi-4] lea eax,[esi-sizeof.EDITOR_LINE_DATA]
call get_line_offset call get_line_offset
sub eax,esi sub eax,esi
mov [cur_editor.SelStart.X],eax mov [cur_editor.SelStart.X],eax
@ -169,12 +169,13 @@ proc search
.end_line: .end_line:
pop esi pop esi
.end_line.2: .end_line.2:
movzx eax,word[esi-4] mov eax,[esi-sizeof.EDITOR_LINE_DATA+EDITOR_LINE_DATA.Size]
add esi,eax add esi,eax
inc edx inc edx
call get_real_length call get_real_length
mov ecx,eax mov ecx,eax
lodsd lodsd
add esi,2
or eax,eax or eax,eax
jnz .next_line jnz .next_line
.exit: .exit:

View File

@ -27,8 +27,8 @@ recode:
xor eax,eax xor eax,eax
.lp0: dec ecx .lp0: dec ecx
js .exit js .exit
movzx edx,word[esi] mov edx,[esi+EDITOR_LINE_DATA.Size]
add esi,4 add esi,sizeof.EDITOR_LINE_DATA
@@: dec edx @@: dec edx
js .lp0 js .lp0
lodsb lodsb