This repository has been archived on 2024-09-25. You can view files and clone it, but cannot push or open issues or pull requests.
overlay/games-strategy/widelands/files/widelands-0.19-fix_maybe_uninitialized.patch
2018-06-19 11:49:01 +02:00

22 lines
812 B
Diff

--- a/src/network/netclient.cc 2017-09-07 17:03:04.532134374 +0200
+++ b/src/network/netclient.cc 2017-09-07 17:10:54.603125955 +0200
@@ -477,6 +477,8 @@
// This might happen, if a users connects after the game starts.
if (number == d->settings.users.size()) {
UserSettings newuser;
+ newuser.position = number;
+ newuser.ready = false;
d->settings.users.push_back(newuser);
}
--- a/src/network/nethost.cc 2017-09-07 17:11:58.924124804 +0200
+++ b/src/network/nethost.cc 2017-09-07 17:13:37.339123041 +0200
@@ -1612,6 +1612,7 @@
if (client.usernum == -1) {
client.usernum = d->settings.users.size();
UserSettings newuser;
+ newuser.position = client.usernum;
newuser.result = Widelands::PlayerEndResult::UNDEFINED;
newuser.ready = true;
d->settings.users.push_back(newuser);