fix crash when unable to convert from local to utf-8
simonb simonb
2 files changed,
5 insertions(+),
0 deletions(-)
M
src/FbTk/FbString.cc
→
src/FbTk/FbString.cc
@@ -130,6 +130,9 @@ // If empty message, yes this can happen, return
if (in.empty()) return ""; + if (cd == ((iconv_t)(-1))) + return in; // can't convert + size_t insize = in.size(); size_t outsize = insize; char * out = (char *) malloc(outsize * sizeof(char)); // need realloc