git.stg.codes
/
stg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96f8ba7
)
Do not stop on \0 while encoding binary to string
author
Maxim Mamontov
<faust@gts.dp.ua>
Tue, 12 Apr 2011 09:37:31 +0000
(12:37 +0300)
committer
Maxim Mamontov
<faust@gts.dp.ua>
Tue, 12 Apr 2011 09:37:31 +0000
(12:37 +0300)
stglibs/common.lib/common.cpp
patch
|
blob
|
history
diff --git
a/stglibs/common.lib/common.cpp
b/stglibs/common.lib/common.cpp
index 37ce079d290b9c9877b7871ed85dcaf9851b85b1..d0f1ff4d27bf935c42aede48843be183daecda16 100644
(file)
--- 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;