aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/BufferedInStream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rdr/BufferedInStream.cxx')
-rw-r--r--common/rdr/BufferedInStream.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/rdr/BufferedInStream.cxx b/common/rdr/BufferedInStream.cxx
index 3c04bafc..204202ec 100644
--- a/common/rdr/BufferedInStream.cxx
+++ b/common/rdr/BufferedInStream.cxx
@@ -26,6 +26,8 @@
#include <rdr/BufferedInStream.h>
#include <rdr/Exception.h>
+#include <rfb/util.h>
+
using namespace rdr;
static const size_t DEFAULT_BUF_SIZE = 8192;
@@ -63,9 +65,10 @@ void BufferedInStream::ensureSpace(size_t needed)
uint8_t* newBuffer;
if (needed > MAX_BUF_SIZE)
- throw Exception("BufferedInStream overrun: requested size of "
- "%lu bytes exceeds maximum of %lu bytes",
- (long unsigned)needed, (long unsigned)MAX_BUF_SIZE);
+ throw Exception(rfb::format("BufferedInStream overrun: requested "
+ "size of %lu bytes exceeds maximum "
+ "of %lu bytes", (long unsigned)needed,
+ (long unsigned)MAX_BUF_SIZE));
newSize = DEFAULT_BUF_SIZE;
while (newSize < needed)