Skip to content

Commit

Permalink
forgot about goto on #18, fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mtivadar committed Jun 28, 2015
1 parent c6ac72c commit d33c321
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions plugins/format/bootsector.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,24 @@ def registerShortcuts(self, parent):


class MyDialogGoto(DialogGoto):
def fa(self, offset):
return offset - 0x7c00
def initUI(self):
super(MyDialogGoto, self).initUI()
self.ui.comboBox.clear()

# for bootsector we have fileaddress/load(mem)address
self.ui.comboBox.addItems(['FileAddress', 'MemAddress'])

self.GoTos = {'FileAddress' : self.fa, 'MemAddress' : self.va}

# goto address type fa/va
def fa(self, result):
return result

def va(self, offset):
if offset < 0x7c00:
return 0

return offset - 0x7c00

class WHeaders(QtGui.QDialog):

Expand Down

0 comments on commit d33c321

Please # to comment.