diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-01 03:54:47 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-01 03:54:47 +0000 |
commit | 6507de24f5925f007f6c5460c41dfc0dd5611979 (patch) | |
tree | 4b422db20677e32544248827ce5d41ef7aedaf69 /crawl-ref/source/describe.cc | |
parent | 799608cc0617313ccde9cc7848e284e31339ecbc (diff) | |
download | crawl-ref-6507de24f5925f007f6c5460c41dfc0dd5611979.tar.gz crawl-ref-6507de24f5925f007f6c5460c41dfc0dd5611979.zip |
Add miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6279 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r-- | crawl-ref/source/describe.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 90ae783279..c7aa24d5fb 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -125,7 +125,7 @@ void print_description( const std::string &d ) if (nextLine >= currentPos && nextLine < currentPos + lineWidth) { cprintf("%s", (d.substr(currentPos, nextLine-currentPos)).c_str()); - currentPos = nextLine +1; + currentPos = nextLine + 1; continue; } @@ -150,8 +150,7 @@ void print_description( const std::string &d ) // oops. just truncate. nextLine = currentPos + lineWidth; - if (nextLine > d.length()) - nextLine = d.length(); + nextLine = std::min(d.length(), nextLine); cprintf((d.substr(currentPos, nextLine - currentPos)).c_str()); currentPos = nextLine; |