robmcmullen / omnivore

Hex editor and debugging emulator, sponsored by the Player/Missile Podcast
Mozilla Public License 2.0
53 stars 7 forks source link

Paste error with one byte destination selection #233

Open robmcmullen opened 6 years ago

robmcmullen commented 6 years ago

Copied a bunch of bytes, highlighted one cell, paste:

Traceback (most recent call last):
  File "/data/home/rob/src/omnivore/pyface/ui/wx/action/action_item.py", line 278, in _on_menu
    self.controller.perform(action, action_event)
  File "/data/home/rob/src/omnivore/pyface/tasks/action/task_action_controller.py", line 31, in perform
    return action.perform(event)
  File "/data/home/rob/src/omnivore/omnivore/framework/actions.py", line 319, in perform
    self.active_editor.paste()
  File "/data/home/rob/src/omnivore/omnivore/framework/editor.py", line 363, in paste
    self.process_paste_data_object(data_obj, cmd_cls)
  File "/data/home/rob/src/omnivore/omnivore8bit/byte_edit/byte_editor.py", line 176, in process_paste_data_object
    self.process_command(cmd)
  File "/data/home/rob/src/omnivore/omnivore/framework/editor.py", line 675, in process_command
    undo = self.process_batch_command(command, f, batch)
  File "/data/home/rob/src/omnivore/omnivore/framework/editor.py", line 688, in process_batch_command
    undo = self.document.undo_stack.perform(command, self, batch)
  File "/data/home/rob/src/omnivore/omnivore/utils/command.py", line 89, in perform
    cmd.perform(editor, undo_info)
  File "/data/home/rob/src/omnivore/omnivore/utils/command.py", line 355, in perform
    old_data = self.do_change(editor, undo_info)
  File "/data/home/rob/src/omnivore/omnivore8bit/commands.py", line 155, in do_change
    self.segment[indexes] = data
  File "/data/home/rob/src/atrcopy/atrcopy/segments.py", line 566, in __setitem__
    self.data[index] = value
ValueError: shape mismatch: value array of shape (99,) could not be broadcast to indexing result of shape (1,)