From 0e1425d475f0e719623f48949cf7a9dc5347a2e3 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 7 Sep 2010 03:38:27 +0000 Subject: [PATCH] *Core: HexString with count = 0 fix git-svn-id: svn://ultimatepp.org/upp/trunk@2660 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Util.cpp | 3 +++ 1 file changed, 3 insertions(+) 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;