mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 11:11:23 +00:00
properly fixed bug #16456
This commit is contained in:
parent
3d15c2fc34
commit
9ea22e8099
@ -171,7 +171,7 @@ game_info::game_info(const config& game, const config& game_config)
|
||||
, vision()
|
||||
, status()
|
||||
, time_limit()
|
||||
, vacant_slots(game["slots"].to_int())
|
||||
, vacant_slots(lexical_cast_default<int>(game["slots"], 0)) // Can't use to_int() here.
|
||||
, current_turn(0)
|
||||
, reloaded(game["savegame"].to_bool())
|
||||
, started(false)
|
||||
|
@ -511,7 +511,7 @@ bool game::describe_slots() {
|
||||
}
|
||||
}
|
||||
char buf[50];
|
||||
snprintf(buf,sizeof(buf), "%d", available_slots);
|
||||
snprintf(buf,sizeof(buf), "%d/%d", available_slots, num_sides);
|
||||
|
||||
if ((*description_)["slots"] != buf) {
|
||||
description_->set_attr_dup("slots", buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user