properly fixed bug #16456

This commit is contained in:
Gunter Labes 2010-08-20 19:41:56 +00:00
parent 3d15c2fc34
commit 9ea22e8099
2 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ game_info::game_info(const config& game, const config& game_config)
, vision() , vision()
, status() , status()
, time_limit() , 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) , current_turn(0)
, reloaded(game["savegame"].to_bool()) , reloaded(game["savegame"].to_bool())
, started(false) , started(false)

View File

@ -511,7 +511,7 @@ bool game::describe_slots() {
} }
} }
char buf[50]; char buf[50];
snprintf(buf,sizeof(buf), "%d", available_slots); snprintf(buf,sizeof(buf), "%d/%d", available_slots, num_sides);
if ((*description_)["slots"] != buf) { if ((*description_)["slots"] != buf) {
description_->set_attr_dup("slots", buf); description_->set_attr_dup("slots", buf);