do not zero allocated space, just append null character at the end of string

master
Andrzej Rybczak 17 years ago
parent 2649c4a86b
commit 88c37b581d
  1. 3
      src/charset.cpp

@ -69,7 +69,6 @@ namespace
len = strlen(inbuf);
size_t buflen = len*6+1;
char *outbuf = new char[buflen];
memset(outbuf, 0, sizeof(char)*buflen);
char *outstart = outbuf;
char *instart = inbuf;
@ -80,7 +79,7 @@ namespace
return;
}
iconv_close(cd);
*outbuf = 0;
str_pool_put(instart);
inbuf = str_pool_get(outstart);
delete [] outstart;

Loading…
Cancel
Save