summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-29 13:09:30 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-29 13:09:30 +0300
commit3ef886b241c5654bf21e5326d1299ccde161b228 (patch)
treec3596884a6c0b19cdcf06a41ff66de639c0189a9 /src
parent6f6cac1787dec5f15b298c18c08339cacde7cb99 (diff)
downloadplus-3ef886b241c5654bf21e5326d1299ccde161b228.tar.gz
plus-3ef886b241c5654bf21e5326d1299ccde161b228.tar.bz2
plus-3ef886b241c5654bf21e5326d1299ccde161b228.tar.xz
plus-3ef886b241c5654bf21e5326d1299ccde161b228.zip
Fix password length limit messages.
Diffstat (limited to 'src')
-rw-r--r--src/gui/changeemaildialog.cpp2
-rw-r--r--src/gui/changepassworddialog.cpp2
-rw-r--r--src/gui/registerdialog.cpp2
-rw-r--r--src/gui/unregisterdialog.cpp2
-rw-r--r--src/net/ea/loginhandler.h2
-rw-r--r--src/net/eathena/loginhandler.h2
-rw-r--r--src/net/tmwa/loginhandler.h2
7 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/changeemaildialog.cpp b/src/gui/changeemaildialog.cpp
index 3cf519336..cd10b8dfa 100644
--- a/src/gui/changeemaildialog.cpp
+++ b/src/gui/changeemaildialog.cpp
@@ -141,7 +141,7 @@ void ChangeEmailDialog::action(const gcn::ActionEvent &event)
"least %u characters long."), min);
error = 1;
}
- else if (newFirstEmail.length() > max - 1 )
+ else if (newFirstEmail.length() > max)
{
// First email address too long
// TRANSLATORS: change email error
diff --git a/src/gui/changepassworddialog.cpp b/src/gui/changepassworddialog.cpp
index c337dccdf..3f41df3c5 100644
--- a/src/gui/changepassworddialog.cpp
+++ b/src/gui/changepassworddialog.cpp
@@ -129,7 +129,7 @@ void ChangePasswordDialog::action(const gcn::ActionEvent &event)
" %u characters long."), min);
error = 2;
}
- else if (newFirstPass.length() > max - 1 )
+ else if (newFirstPass.length() > max)
{
// First password too long
// TRANSLATORS: change password error
diff --git a/src/gui/registerdialog.cpp b/src/gui/registerdialog.cpp
index bafcad58a..183f6b6b8 100644
--- a/src/gui/registerdialog.cpp
+++ b/src/gui/registerdialog.cpp
@@ -219,7 +219,7 @@ void RegisterDialog::action(const gcn::ActionEvent &event)
minPass);
error = 2;
}
- else if (mPasswordField->getText().length() > maxPass - 1 )
+ else if (mPasswordField->getText().length() > maxPass)
{
// Pass too long
errorMsg = strprintf
diff --git a/src/gui/unregisterdialog.cpp b/src/gui/unregisterdialog.cpp
index a88ac7e16..3640456d0 100644
--- a/src/gui/unregisterdialog.cpp
+++ b/src/gui/unregisterdialog.cpp
@@ -126,7 +126,7 @@ void UnRegisterDialog::action(const gcn::ActionEvent &event)
"characters long."), min);
error = true;
}
- else if (password.length() > max - 1)
+ else if (password.length() > max)
{
// TRANSLATORS: unregister dialog. error message.
errorMsg << strprintf(_("The password needs to be less than "
diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h
index e84da5ce4..d1994f73d 100644
--- a/src/net/ea/loginhandler.h
+++ b/src/net/ea/loginhandler.h
@@ -51,7 +51,7 @@ class LoginHandler : public Net::LoginHandler
virtual unsigned int getMaxPasswordLength() const
override A_WARN_UNUSED
- { return 25; }
+ { return 24; }
virtual void loginAccount(LoginData *const loginData) const override;
diff --git a/src/net/eathena/loginhandler.h b/src/net/eathena/loginhandler.h
index 7c9b5eb61..f7c136e39 100644
--- a/src/net/eathena/loginhandler.h
+++ b/src/net/eathena/loginhandler.h
@@ -55,7 +55,7 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler
{ return SetGenderOnRegister; }
unsigned int getMaxPasswordLength() const override A_WARN_UNUSED
- { return 25; }
+ { return 24; }
void changePassword(const std::string &username,
const std::string &oldPassword,
diff --git a/src/net/tmwa/loginhandler.h b/src/net/tmwa/loginhandler.h
index 972bf353a..30a0bd286 100644
--- a/src/net/tmwa/loginhandler.h
+++ b/src/net/tmwa/loginhandler.h
@@ -52,7 +52,7 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler
int supportedOptionalActions() const override A_WARN_UNUSED;
unsigned int getMaxPasswordLength() const override A_WARN_UNUSED
- { return 25; }
+ { return 24; }
void changePassword(const std::string &username,
const std::string &oldPassword,