From 29d858c70589fdb8a3279d930103a43b8cc7d6c7 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 30 Jun 2024 22:19:13 -0300 Subject: [PATCH] Fix wrong offset being read when syncing accounts between char-server and login-server Char-Server writes the account ids starting at offset 8, while login-server was reading from offset 6 This caused account ids to be messed up when syncing both servers, thus, many players (if not all) would be considered as logged off by login-server at this point and this would them invalidate API Server token --- src/login/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/login/login.c b/src/login/login.c index 8a4458bd857..73a07c8c935 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -679,7 +679,7 @@ static void login_fromchar_parse_online_accounts(int fd, int id) login->online_db->foreach(login->online_db, login->online_db_setoffline, id); //Set all chars from this char-server offline first users = RFIFOW(fd,4); for (i = 0; i < users; i++) { - int aid = RFIFOL(fd,6+i*4); + int aid = RFIFOL(fd, 8 + i * 4); struct online_login_data *p = idb_ensure(login->online_db, aid, login->create_online_user); p->char_server = id; if (p->waiting_disconnect != INVALID_TIMER)