summaryrefslogtreecommitdiff
path: root/src/bencode2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/bencode2.cc')
-rw-r--r--src/bencode2.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bencode2.cc b/src/bencode2.cc
index 6e2d3b8c..83dbd684 100644
--- a/src/bencode2.cc
+++ b/src/bencode2.cc
@@ -73,8 +73,9 @@ static std::string decoderawstring(std::istream& ss)
if(ss.gcount() != static_cast<int>(length)) {
throw DL_ABORT_EX
(StringFormat("Bencode decoding failed:"
- " Expected %lu bytes of data, but only %d read.",
- static_cast<unsigned long>(length), ss.gcount()).str());
+ " Expected %lu bytes of data, but only %ld read.",
+ static_cast<unsigned long>(length),
+ static_cast<long int>(ss.gcount())).str());
}
return str;
}