Skip to content

Commit 6a2626f

Browse files
committed
Verify username length
1 parent b1040a3 commit 6a2626f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

blastback_client/src/com/blastback/appstates/GUIAppState.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ public boolean hostAvailabilityCheck()
145145

146146
private boolean verifyStartScreenInput()
147147
{
148-
return (!getTextIp().equals("") && !getTextName().equals("") && getTextPort() != -1);
148+
int maxNameLength = 6;
149+
return (!getTextIp().equals("") && getTextName().length() > 0 &&
150+
getTextName().length() <= maxNameLength && getTextPort() != -1);
149151
}
150152

151153
private void attachGameStates()

0 commit comments

Comments
 (0)