Skip to content

Commit

Permalink
gui2/teditor_edit_side: Make controller_num ctor parameter a reference
Browse files Browse the repository at this point in the history
This eliminates the stack corruption issue found by gfgtdf and makes the
parameter work like the rest, though it should be noted that the caller
doesn't do anything useful with it at the moment and needs to be fixed
separately.

(See also commit f16dec9.)
  • Loading branch information
irydacea committed Jun 5, 2015
1 parent 98bcaa7 commit fe27196
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/gui/dialogs/editor/editor_edit_side.cpp
Expand Up @@ -62,7 +62,7 @@ teditor_edit_side::teditor_edit_side(int side,
bool& shroud,
bool& share_maps,
team::CONTROLLER& controller,
int /*controller_num*/,
int& controller_num,
bool& no_leader,
bool& hidden)
: controller_(controller)
Expand All @@ -80,8 +80,7 @@ teditor_edit_side::teditor_edit_side(int side,
register_integer("village_income", true, village_income);
register_integer("village_support", true, village_support);

//The following line is outommented becasue it causes crashs.
//register_integer("controller_number_player", true, controller_num);
register_integer("controller_number_player", true, controller_num);

register_bool("fog", true, fog);
register_bool("share_view", true, share_view);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs/editor/editor_edit_side.hpp
Expand Up @@ -39,7 +39,7 @@ class teditor_edit_side : public tdialog
bool& shroud,
bool& share_maps,
team::CONTROLLER& controller,
int controller_num,
int& controller_num,
bool& no_leader,
bool& hidden);

Expand Down

0 comments on commit fe27196

Please sign in to comment.