From: Maxim Mamontov Date: Tue, 12 Apr 2011 09:37:31 +0000 (+0300) Subject: Do not stop on \0 while encoding binary to string X-Git-Tag: 2.407-rc3~3 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/c31d4290750d0d9032ac8b91f432a990f0645c71?ds=sidebyside;hp=96f8ba7ed42706e7d875ffd0dac3f62ec4c43ba5 Do not stop on \0 while encoding binary to string --- diff --git a/stglibs/common.lib/common.cpp b/stglibs/common.lib/common.cpp index 37ce079d..d0f1ff4d 100644 --- a/stglibs/common.lib/common.cpp +++ b/stglibs/common.lib/common.cpp @@ -368,12 +368,6 @@ void Encode12(char * dst, const char * src, size_t srcLen) { for (size_t i = 0; i <= srcLen; i++) { - if (src[i] == 0) - { - dst[i * 2] = 'a'; - dst[i * 2 + 1] = 'a'; - break; - } char c1 = src[i] & 0x0f; char c2 = (src[i] & 0xf0) >> 4;