From 848a76b6e9f0e2958ee8b8fb6f868262b4880952 Mon Sep 17 00:00:00 2001 From: GerdtR Date: Tue, 6 Aug 2013 19:40:30 +0000 Subject: [PATCH] Fixed a bug when deleting section git-svn-id: svn://kolibrios.org@3859 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../develop/libraries/libs-dev/libini/libini.asm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/programs/develop/libraries/libs-dev/libini/libini.asm b/programs/develop/libraries/libs-dev/libini/libini.asm index 02c84ddb9b..029c83ac3e 100644 --- a/programs/develop/libraries/libs-dev/libini/libini.asm +++ b/programs/develop/libraries/libs-dev/libini/libini.asm @@ -729,12 +729,15 @@ endl mcall 70 mov edi,[begMem] ;search begin section + jmp .searchSect + .NoFindSect: + mov edi,[begDel] .searchSect: mov al,'[' repne scasb test ecx,ecx jnz @f - + pop esi edi ecx ebx mov eax,1 ret @@ -746,16 +749,15 @@ endl test al,al jz @f scasb - jne .searchSect + jne .NoFindSect jmp @b @@: cmp byte[edi],']' - jne .searchSect + jne .NoFindSect + mov edi,[begDel] dec [begDel] - - mov edi,[begDel] ;search end section - inc edi + ;search end section .searchEndSect: mov al,'[' repne scasb @@ -780,6 +782,7 @@ endl mov eax,dword[funcFile+12] sub eax,[endDel] add eax,[begDel] + dec eax mov dword[funcFile],2 ;write buffer to file mov dword[funcFile+12],eax @@ -1054,4 +1057,3 @@ export \ ini.set_color , 'ini_set_color' , \ ini.get_shortcut , 'ini_get_shortcut' , \ ini.del_section , 'ini_del_section' - \ No newline at end of file