summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/command.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-24 19:25:34 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-24 19:25:34 +0000
commitfa22f87e8ff71520801954ebeebff2e4499709c8 (patch)
treee19863a17482e5199573bded6dbaa8682eb58118 /crawl-ref/source/command.cc
parentf8704eab05ba8d555fb94565dd80dd3fdacb2a6c (diff)
downloadcrawl-ref-fa22f87e8ff71520801954ebeebff2e4499709c8.tar.gz
crawl-ref-fa22f87e8ff71520801954ebeebff2e4499709c8.zip
Refix ?/ error message format to handle 64-bit and 32-bit size_t without
compiler warning noises. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2194 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/command.cc')
-rw-r--r--crawl-ref/source/command.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 047dcf32e3..50b17ed9a2 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -1023,13 +1023,10 @@ static bool find_description()
}
else
{
- char num_buf[10];
- sprintf(num_buf, "%lu", key_list.size());
- list_commands_err = "Too many matching ";
- list_commands_err += type;
- list_commands_err += "s (";
- list_commands_err += num_buf;
- list_commands_err += ") to display";
+ std::ostringstream os;
+ os << "Too many matching " << type << "s (" << key_list.size()
+ << ") to display.";
+ list_commands_err = os.str();
}
return (false);
}