- fixed uninitialized variable in savegame name entering menu.

This commit is contained in:
Christoph Oelckers 2020-01-06 21:11:59 +01:00
parent e1e2b01c84
commit 2a0104092d
2 changed files with 2 additions and 3 deletions

View file

@ -717,7 +717,6 @@ class DTextEnterMenu : public DMenu
FString mEnterString; FString mEnterString;
int mEnterSize; int mEnterSize;
int mEnterPos;
bool mInputGridOkay; bool mInputGridOkay;
int InputGridX; int InputGridX;
int InputGridY; int InputGridY;

View file

@ -67,7 +67,7 @@ DTextEnterMenu::DTextEnterMenu(DMenu *parent, FFont *dpf, FString textbuffer, in
: DMenu(parent) : DMenu(parent)
{ {
mEnterString = textbuffer; mEnterString = textbuffer;
mEnterPos = maxlen; mEnterSize = maxlen;
mInputGridOkay = (showgrid && (m_showinputgrid == 0)) || (m_showinputgrid >= 1); mInputGridOkay = (showgrid && (m_showinputgrid == 0)) || (m_showinputgrid >= 1);
if (mEnterString.Len() > 0) if (mEnterString.Len() > 0)
{ {
@ -116,7 +116,7 @@ bool DTextEnterMenu::Responder(event_t *ev)
char ch = (char)ev->data1; char ch = (char)ev->data1;
if ((ev->subtype == EV_GUI_KeyDown || ev->subtype == EV_GUI_KeyRepeat) && ch == '\b') if ((ev->subtype == EV_GUI_KeyDown || ev->subtype == EV_GUI_KeyRepeat) && ch == '\b')
{ {
if (mEnterPos > 0) if (mEnterString.Len() > 0)
{ {
mEnterString.DeleteLastCharacter(); mEnterString.DeleteLastCharacter();
} }