*Core: HexString with count = 0 fix

git-svn-id: svn://ultimatepp.org/upp/trunk@2660 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-09-07 03:38:27 +00:00
parent a123aaf505
commit 0e1425d475

View file

@ -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;