Fixed a bug when deleting section

git-svn-id: svn://kolibrios.org@3859 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
GerdtR 2013-08-06 19:40:30 +00:00
parent 628480ec4f
commit 848a76b6e9

View File

@ -729,6 +729,9 @@ endl
mcall 70 mcall 70
mov edi,[begMem] ;search begin section mov edi,[begMem] ;search begin section
jmp .searchSect
.NoFindSect:
mov edi,[begDel]
.searchSect: .searchSect:
mov al,'[' mov al,'['
repne scasb repne scasb
@ -746,16 +749,15 @@ endl
test al,al test al,al
jz @f jz @f
scasb scasb
jne .searchSect jne .NoFindSect
jmp @b jmp @b
@@: @@:
cmp byte[edi],']' cmp byte[edi],']'
jne .searchSect jne .NoFindSect
mov edi,[begDel]
dec [begDel] dec [begDel]
;search end section
mov edi,[begDel] ;search end section
inc edi
.searchEndSect: .searchEndSect:
mov al,'[' mov al,'['
repne scasb repne scasb
@ -780,6 +782,7 @@ endl
mov eax,dword[funcFile+12] mov eax,dword[funcFile+12]
sub eax,[endDel] sub eax,[endDel]
add eax,[begDel] add eax,[begDel]
dec eax
mov dword[funcFile],2 ;write buffer to file mov dword[funcFile],2 ;write buffer to file
mov dword[funcFile+12],eax mov dword[funcFile+12],eax
@ -1054,4 +1057,3 @@ export \
ini.set_color , 'ini_set_color' , \ ini.set_color , 'ini_set_color' , \
ini.get_shortcut , 'ini_get_shortcut' , \ ini.get_shortcut , 'ini_get_shortcut' , \
ini.del_section , 'ini_del_section' ini.del_section , 'ini_del_section'