projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5f1e335
)
fix segfault
author
hgn
<hgodden00@gmail.com>
Mon, 13 Nov 2023 03:08:02 +0000
(
03:08
+0000)
committer
hgn
<hgodden00@gmail.com>
Mon, 13 Nov 2023 03:08:02 +0000
(
03:08
+0000)
world_routes.c
patch
|
blob
|
history
diff --git
a/world_routes.c
b/world_routes.c
index 75ebae8af66a92afdc58d81eb1f6971d3ba89cb1..f512f7ba312714e3863fe1b931b59c119f1a621a 100644
(file)
--- a/
world_routes.c
+++ b/
world_routes.c
@@
-932,13
+932,15
@@
static void world_routes_recv_scoreboard( world_instance *world,
struct leaderboard_cache *board = &world->leaderboard_cache[ route_id ];
board->status = status;
struct leaderboard_cache *board = &world->leaderboard_cache[ route_id ];
board->status = status;
- if( body == NULL )
+ if( body == NULL )
{
board->data_len = 0;
board->data_len = 0;
-
- if( body->max > NETWORK_LEADERBOARD_MAX_SIZE ){
- vg_error( "Scoreboard leaderboard too big (%u>%u)\n", body->max,
- NETWORK_LEADERBOARD_MAX_SIZE );
- return;
+ }
+ else {
+ if( body->max > NETWORK_LEADERBOARD_MAX_SIZE ){
+ vg_error( "Scoreboard leaderboard too big (%u>%u)\n", body->max,
+ NETWORK_LEADERBOARD_MAX_SIZE );
+ return;
+ }
}
memcpy( board->data, body->buf, body->max );
}
memcpy( board->data, body->buf, body->max );