summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/output.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-19 00:13:29 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-19 00:13:29 +0000
commit81b12532efb337e803cd89b290209a2f79a1678d (patch)
tree243f1e59a9c6eb11130ef9cb93d030b93df4e2b5 /crawl-ref/source/output.cc
parent51236f4eb5ea7b4dc68c2cca2e15bb35558f8abf (diff)
downloadcrawl-ref-81b12532efb337e803cd89b290209a2f79a1678d.tar.gz
crawl-ref-81b12532efb337e803cd89b290209a2f79a1678d.zip
[1941577] Fixed issue where title line sometimes contained characters from species line. This was due to the title writing (blank) strings that were too long and wrapping around to the next line.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4349 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r--crawl-ref/source/output.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 94a331dfcf..b931ff01bf 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -904,7 +904,7 @@ void redraw_skill(const std::string &your_name, const std::string &class_name)
std::string title = your_name + " the " + class_name;
int in_len = title.length();
- const int WIDTH = 40; // use crawl_view.hudsz.x instead?
+ const int WIDTH = crawl_view.hudsz.x;
if (in_len > WIDTH)
{
in_len -= 3; // what we're getting back from removing "the"
@@ -923,7 +923,7 @@ void redraw_skill(const std::string &your_name, const std::string &class_name)
cgotoxy(1, 1, GOTO_STAT);
textcolor( YELLOW );
- cprintf( "%-41s", title.c_str() );
+ cprintf( "%-*s", WIDTH, title.c_str() );
cgotoxy(1, 2, GOTO_STAT);
cprintf("%s", species_name( you.species, you.experience_level ).c_str());