Old bug with the 'Mining' string translated still can be reproduced on DF 0.40.10

Issue #1 resolved
insolor
created an issue

The old bug of dfrus34 (https://bitbucket.org/insolor/dfrus/issues/4/df-04010-falling-when-the-mining-string-is) can be reproduced with the most recent version of dfrus-py on DF 0.40.10. It needs more investigations.

In brief: when the 'Mining' string is translated as 'Горное дело', DF 0.40.10 falls when trying to start new fortress.

Comments (5)

  1. insolor reporter

    It falls even the string is 1 character longer then the original one. Trying to make diff between exe with the same len of 'Mining' translation and exe with the longer one.

  2. insolor reporter

    Diff: diff with highlight The problem is that a part of address wrongly recognized as a lea intruction. Fix: additional check in one of fix_len() if-branch.

    Diff as text:

    --- 0.dis   2015-10-21 17:56:09.535023200 +0300
    +++ 1.dis   2015-10-21 17:55:39.406339400 +0300
    @@ -1,5 +1,5 @@
    
    -Dwarf Fortress Patched.exe:     file format pei-i386
    +Dwarf Fortress Patched 1.exe:     file format pei-i386
    
    
     Disassembly of section .text:
    @@ -1102323,11 +1102323,13 @@
       78dbc3:  b8 08 00 00 00          mov    eax,0x8
       78dbc8:  e9 59 11 00 00          jmp    0x78ed26
       78dbcd:  a1 78 49 d5 00          mov    eax,ds:0xd54978
    -  78dbd2:  66 8b 0d 7c 49 d5 00    mov    cx,WORD PTR ds:0xd5497c
    +  78dbd2:  90                      nop
    +  78dbd3:  8b 0d 7c 49 d5 00       mov    ecx,DWORD PTR ds:0xd5497c
       78dbd9:  89 44 24 54             mov    DWORD PTR [esp+0x54],eax
       78dbdd:  a0 7e 49 d5 00          mov    al,ds:0xd5497e
       78dbe2:  88 44 24 5a             mov    BYTE PTR [esp+0x5a],al
    -  78dbe6:  66 89 4c 24 58          mov    WORD PTR [esp+0x58],cx
    +  78dbe6:  90                      nop
    +  78dbe7:  89 4c 24 58             mov    DWORD PTR [esp+0x58],ecx
       78dbeb:  b8 08 00 00 00          mov    eax,0x8
       78dbf0:  e9 31 11 00 00          jmp    0x78ed26
       78dbf5:  a1 b0 2b d7 00          mov    eax,ds:0xd72bb0
    @@ -1211527,7 +1211529,7 @@
       7e88a1:  83 c0 0d                add    eax,0xd
       7e88a4:  83 f8 5a                cmp    eax,0x5a
       7e88a7:  0f 87 97 04 00 00       ja     0x7e8d44
    -  7e88ad:  ff 24 85 48 8d 7e 00    jmp    DWORD PTR [eax*4+0x7e8d48]
    +  7e88ad:  ff 24 85 48 8d 7e 01    jmp    DWORD PTR [eax*4+0x17e8d48]
       7e88b4:  b8 78 49 d5 00          mov    eax,0xd54978
       7e88b9:  56                      push   esi
       7e88ba:  e8 e1 6b c2 ff          call   0x40f4a0
    @@ -1698588,7 +1698590,7 @@
       9663b2:  83 f8 05                cmp    eax,0x5
       9663b5:  77 67                   ja     0x96641e
       9663b7:  ff 24 85 30 64 96 00    jmp    DWORD PTR [eax*4+0x966430]
    -  9663be:  6a 06                   push   0x6
    +  9663be:  6a 07                   push   0x7
       9663c0:  b8 78 49 d5 00          mov    eax,0xd54978
       9663c5:  8b ce                   mov    ecx,esi
       9663c7:  e8 d4 92 aa ff          call   0x40f6a0
    
  3. Log in to comment