diff options
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r-- | crawl-ref/source/ouch.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 4cc78e65d8..f73f3c20da 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -891,15 +891,12 @@ void end_game( struct scorefile_entry &se ) cprintf( "Goodbye, %s.", you.your_name ); cprintf( EOL EOL " " ); // Space padding where # would go in list format - char scorebuff[ HIGHSCORE_SIZE ]; - hiscores_format_single_long( scorebuff, se, true ); - // truncate - scorebuff[ HIGHSCORE_SIZE - 1 ] = 0; + std::string hiscore = hiscores_format_single_long( se, true ); - const int lines = count_occurrences(scorebuff, EOL) + 1; + const int lines = count_occurrences(hiscore, EOL) + 1; - cprintf( scorebuff ); + cprintf( "%s", hiscore.c_str() ); cprintf( EOL "Best Crawlers -" EOL ); |