Fresh IDE . Check-in [7f6b849cb2]
Not logged in

This repository is a mirror!

The original is located on: https://fresh.flatassembler.net/fossil/repo/fresh
If you want to follow the project, please update your remote-url

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed bug in bbcode.asm
Timelines: family | ancestors | descendants | both | FreshLibDev
Files: files | file ages | folders
SHA1:7f6b849cb28cce2ad5613362ef143509b3284f75
User & Date: johnfound 2018-12-19 13:51:26
Context
2018-12-21
16:28
Fixed bug, causing infinite loop. More tests needed! check-in: 11de3f0cc1 user: johnfound tags: FreshLibDev
2018-12-19
13:51
Fixed bug in bbcode.asm check-in: 7f6b849cb2 user: johnfound tags: FreshLibDev
2018-12-14
19:58
More precise emoticon encoding. check-in: e00eaed541 user: johnfound tags: FreshLibDev
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to freshlib/data/bbcode.asm.

682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
...
704
705
706
707
708
709
710

711
712
713
714
715
716
717

        push    ecx

        mov     eax, ebx
        sub     eax, edi        ; the length of the tag
        movzx   ecx, byte [esi-1]  ; the length of the string in the hash table.
        cmp     ecx, eax
        jne     .not_a_tag

        lea     eax, [ebx+1]
        stdcall TextMoveGap, edx, eax           ; the gap is after the tag, so, the offset and the position are the same.

        add     edi, edx        ; the pointer to the tag start.
        xchg    esi, edi

................................................................................
        and     ah, $40
        shr     ah, 1
        or      al, ah

        scasb
        je      .cmp_loop2


        pop     ecx
        jmp     .not_a_tag   ; the strings are different, so it is a collision. Ignore.

.equal2:
        pop     ecx

; the tag name is the same!







|







 







>







682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
...
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718

        push    ecx

        mov     eax, ebx
        sub     eax, edi        ; the length of the tag
        movzx   ecx, byte [esi-1]  ; the length of the string in the hash table.
        cmp     ecx, eax
        jne     .not_a_closing_tag

        lea     eax, [ebx+1]
        stdcall TextMoveGap, edx, eax           ; the gap is after the tag, so, the offset and the position are the same.

        add     edi, edx        ; the pointer to the tag start.
        xchg    esi, edi

................................................................................
        and     ah, $40
        shr     ah, 1
        or      al, ah

        scasb
        je      .cmp_loop2

.not_a_closing_tag:
        pop     ecx
        jmp     .not_a_tag   ; the strings are different, so it is a collision. Ignore.

.equal2:
        pop     ecx

; the tag name is the same!