projects
/
valheim_web.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95461b5
)
Fix an issue where too few player was displayed
author
Greg Burri
<greg.burri@gmail.com>
Mon, 22 Mar 2021 21:39:59 +0000
(22:39 +0100)
committer
Greg Burri
<greg.burri@gmail.com>
Mon, 22 Mar 2021 21:39:59 +0000
(22:39 +0100)
backend/src/valheim_controller.rs
patch
|
blob
|
history
diff --git
a/backend/src/valheim_controller.rs
b/backend/src/valheim_controller.rs
index
aaf82f0
..
29f30f1
100644
(file)
--- a/
backend/src/valheim_controller.rs
+++ b/
backend/src/valheim_controller.rs
@@
-109,7
+109,9
@@
fn get_active_players() -> Vec<String> {
let nb_of_connections_str = mess.get(pos+STRING_BEFORE_NB_OF_CONNECTIONS.len()+1..).unwrap();
\r
if let Some(pos_end) = nb_of_connections_str.find(' ') {
\r
if let Ok(n) = nb_of_connections_str.get(0..pos_end).unwrap().parse() {
\r
- number_of_connections = n;
\r
+ if n > number_of_connections {
\r
+ number_of_connections = n;
\r
+ }
\r
if players.len() >= number_of_connections {
\r
return players;
\r
}
\r