[Commits] [wesnoth/wesnoth] 0ac850: fix a segfault

GitHub noreply at github.com
Wed Jun 18 23:12:30 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 0ac850847f650729ed4dbe76d4e4494a2926fcc9
      https://github.com/wesnoth/wesnoth/commit/0ac850847f650729ed4dbe76d4e4494a2926fcc9
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-06-19 (Thu, 19 Jun 2014)

  Changed paths:
    M src/hotkey/hotkey_command.cpp
    M src/hotkey/hotkey_item.cpp

  Log Message:
  -----------
  fix a segfault

scope_active_.size() = SCOPE_COUNT, so scope_active_[SCOPE_COUNT] is
undefined behaviour.

it seems like in add_hotkey it can happen that
hotkey::get_hotkey_command(item.get_command()).scope return SCOPE_COUNT
for wml hotkeys





More information about the Commits mailing list