aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonb <simonb>2006-06-25 07:18:41 (GMT)
committersimonb <simonb>2006-06-25 07:18:41 (GMT)
commit577859034db0e0e36ceab85ebba62e1018dd3361 (patch)
tree90b1bac6136db4aaf3ad704a2107e3271ee5ae10
parent87e401edf6146e4205bdfc807651a7d627a323db (diff)
downloadfluxbox-577859034db0e0e36ceab85ebba62e1018dd3361.zip
fluxbox-577859034db0e0e36ceab85ebba62e1018dd3361.tar.bz2
fix crash when unable to convert from local to utf-8
-rw-r--r--ChangeLog2
-rw-r--r--src/FbTk/FbString.cc3
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2723d3d..d6d5a94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc2: 2Changes for 1.0rc2:
3*06/06/25: 3*06/06/25:
4 * Fix crash when unable to convert between local and utf-8 encodings (Simon)
5 FbTk/FbString.cc
4 * Fix DetachClient key command so new window is visible (Mark) 6 * Fix DetachClient key command so new window is visible (Mark)
5 Window.cc 7 Window.cc
6*06/06/24: 8*06/06/24:
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