From dd4bb5f5209e3f7a232c71966633b13c0d5c318b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 25 May 2010 22:24:43 +0200 Subject: [PATCH] game: Lobby ID shouldn't be allowed to be 0 yet, otherwise conflicts occur. --- src/egs_game.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egs_game.erl b/src/egs_game.erl index d77f08f..9b91fe5 100644 --- a/src/egs_game.erl +++ b/src/egs_game.erl @@ -84,7 +84,7 @@ process_handle(16#020d, CSocket, Version, Packet) -> case User#users.auth of Auth -> log(GID, "good auth, proceed"), - LID = egs_db:next(lobby) rem 1024, + LID = 1 + egs_db:next(lobby) rem 1023, Time = calendar:datetime_to_gregorian_seconds(calendar:universal_time()), egs_db:users_insert(#users{gid=GID, pid=self(), socket=CSocket, auth=success, time=Time, folder=User#users.folder, lid=LID}), egs_proto:send_flags(CSocket, GID),