Advertisement
Guest User

DF Linux: stop mistakenly unassigning weapon racks

a guest
Oct 26th, 2012
722
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. Fix use of uninitialized variables to stop auto-unassigning racks:
  2.  
  3. 0x7ee948
  4. 8B 7C 24 3C
  5. 89 C7 90 90
  6.  
  7. .text:08836948 mov edi, eax
  8. .text:0883694A nop
  9. .text:0883694B nop
  10.  
  11.  
  12. 0x7eea2f
  13. 8B 7C 24 3C
  14. 89 C7 90 90
  15.  
  16. .text:08836A2F mov edi, eax
  17. .text:08836A31 nop
  18. .text:08836A32 nop
  19.  
  20. basically:
  21.  
  22. b_squad_id = building->getSpecificSquad();
  23. - if (b_squad_id != squad->id || !building->canUse(some_other_squad_id, 4))
  24. + if (b_squad_id != squad->id || !building->canUse(b_squad_id, 4))
  25. unassign(building);
  26.  
  27. the reason being, some_other_squad_id contains irrelevant garbage at this point
  28.  
  29.  
  30. ---8<---
  31. This difference file is created by The Interactive Disassembler
  32.  
  33. Dwarf_Fortress
  34. 007EE948: 8B 89
  35. 007EE949: 7C C7
  36. 007EE94A: 24 90
  37. 007EE94B: 3C 90
  38. 007EEA2F: 8B 89
  39. 007EEA30: 7C C7
  40. 007EEA31: 24 90
  41. 007EEA32: 3C 90
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement