diff --git a/uppsrc/Core/Util.cpp b/uppsrc/Core/Util.cpp index ddc2287d6..a72475176 100644 --- a/uppsrc/Core/Util.cpp +++ b/uppsrc/Core/Util.cpp @@ -544,6 +544,9 @@ String Decode64(const String& s) String HexString(const byte *s, int count, int sep, int sepchr) { + ASSERT(count >= 0); + if(count == 0) + return String(); StringBuffer b(2 * count + (count - 1) / sep); static const char itoc[] = "0123456789abcdef"; int i = 0;