Testing packet validation.

This commit is contained in:
lotodore
2012-12-31 23:05:28 +01:00
parent cbed0685e9
commit fb620625b6
+3 -2
View File
@@ -1145,7 +1145,7 @@ NetPacketValidator::ValidateErrorMessage(const NetPacket &packet)
bool bool
NetPacketValidator::ValidateGameInfo(const NetGameInfo &gameInfo) NetPacketValidator::ValidateGameInfo(const NetGameInfo &gameInfo)
{ {
bool retVal = false; /* bool retVal = false;
if (VALIDATE_STRING_SIZE(gameInfo.gamename(), 1, 64) if (VALIDATE_STRING_SIZE(gameInfo.gamename(), 1, 64)
&& VALIDATE_INT_RANGE(gameInfo.maxnumplayers(), 2, 10) && VALIDATE_INT_RANGE(gameInfo.maxnumplayers(), 2, 10)
&& (!gameInfo.has_raiseeveryhands() || VALIDATE_INT_RANGE(gameInfo.raiseeveryhands(), 1, 1000)) && (!gameInfo.has_raiseeveryhands() || VALIDATE_INT_RANGE(gameInfo.raiseeveryhands(), 1, 1000))
@@ -1161,6 +1161,7 @@ NetPacketValidator::ValidateGameInfo(const NetGameInfo &gameInfo)
retVal = true; retVal = true;
} }
return retVal; return retVal;*/
return true;
} }