Update to 12.0-beta1
This commit is contained in:
@@ -336,9 +336,8 @@ struct GoalQuestionWindow : public Window {
|
||||
this->question = stredup(question);
|
||||
|
||||
/* Figure out which buttons we have to enable. */
|
||||
uint bit;
|
||||
int n = 0;
|
||||
FOR_EACH_SET_BIT(bit, button_mask) {
|
||||
for (uint bit : SetBitIterator(button_mask)) {
|
||||
if (bit >= GOAL_QUESTION_BUTTON_COUNT) break;
|
||||
this->button[n++] = bit;
|
||||
if (n == 3) break;
|
||||
@@ -384,17 +383,17 @@ struct GoalQuestionWindow : public Window {
|
||||
switch (widget) {
|
||||
case WID_GQ_BUTTON_1:
|
||||
DoCommandP(0, this->window_number, this->button[0], CMD_GOAL_QUESTION_ANSWER);
|
||||
delete this;
|
||||
this->Close();
|
||||
break;
|
||||
|
||||
case WID_GQ_BUTTON_2:
|
||||
DoCommandP(0, this->window_number, this->button[1], CMD_GOAL_QUESTION_ANSWER);
|
||||
delete this;
|
||||
this->Close();
|
||||
break;
|
||||
|
||||
case WID_GQ_BUTTON_3:
|
||||
DoCommandP(0, this->window_number, this->button[2], CMD_GOAL_QUESTION_ANSWER);
|
||||
delete this;
|
||||
this->Close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user