--- a/sources/network/bytestream.cpp Sun May 17 22:07:48 2015 +0300 +++ b/sources/network/bytestream.cpp Wed May 27 21:15:52 2015 +0300 @@ -129,8 +129,12 @@ { if (bytes_left() < bytes) { - throw IOError (format ("attempted to read %1 byte(s) past the end of bytestream", - bytes - bytes_left())); + int bytesPast = bytes - bytes_left(); + + String message; + message.sprintf ("attempted to read %d byte%s past the end of bytestream", + bytesPast, bytesPast != -1 ? "s" : ""); + throw IOError (message); } }