diff options
author | simonb <simonb> | 2006-06-25 07:18:41 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-06-25 07:18:41 (GMT) |
commit | 577859034db0e0e36ceab85ebba62e1018dd3361 (patch) | |
tree | 90b1bac6136db4aaf3ad704a2107e3271ee5ae10 /src/FbTk | |
parent | 87e401edf6146e4205bdfc807651a7d627a323db (diff) | |
download | fluxbox-577859034db0e0e36ceab85ebba62e1018dd3361.zip fluxbox-577859034db0e0e36ceab85ebba62e1018dd3361.tar.bz2 |
fix crash when unable to convert from local to utf-8
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/FbString.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc index 7a0ef1b..93f6aa7 100644 --- a/src/FbTk/FbString.cc +++ b/src/FbTk/FbString.cc | |||
@@ -130,6 +130,9 @@ std::string recode(iconv_t cd, | |||
130 | if (in.empty()) | 130 | if (in.empty()) |
131 | return ""; | 131 | return ""; |
132 | 132 | ||
133 | if (cd == ((iconv_t)(-1))) | ||
134 | return in; // can't convert | ||
135 | |||
133 | size_t insize = in.size(); | 136 | size_t insize = in.size(); |
134 | size_t outsize = insize; | 137 | size_t outsize = insize; |
135 | char * out = (char *) malloc(outsize * sizeof(char)); // need realloc | 138 | char * out = (char *) malloc(outsize * sizeof(char)); // need realloc |