diff options
-rw-r--r-- | src/gui/charcreatedialog.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp index 662bebb7..aa7f7051 100644 --- a/src/gui/charcreatedialog.cpp +++ b/src/gui/charcreatedialog.cpp @@ -163,7 +163,7 @@ void CharCreateDialog::action(const gcn::ActionEvent &event) std::vector<int> atts; for (int i = 0; i < mAttributeSlider.size(); i++) { - atts[i] = (int) mAttributeSlider[i]->getValue(); + atts.push_back((int) mAttributeSlider[i]->getValue()); } Net::getCharHandler()->newCharacter(getName(), mSlot, @@ -276,6 +276,10 @@ void CharCreateDialog::setAttributes(std::vector<std::string> labels, delete mAttributeValue[i]; } + mAttributeLabel.resize(labels.size()); + mAttributeSlider.resize(labels.size()); + mAttributeValue.resize(labels.size()); + int w = 200; int h = 330; |