From 4c38178fb9f84a5a7fd12410ec78d6ebe6bed4f9 Mon Sep 17 00:00:00 2001 From: crs Date: Wed, 24 Jul 2002 17:39:52 +0000 Subject: [PATCH] fixed an off-by-one error in textToUTF8(). --- base/CUnicode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/CUnicode.cpp b/base/CUnicode.cpp index 066f8e5f..cc22f3c1 100644 --- a/base/CUnicode.cpp +++ b/base/CUnicode.cpp @@ -312,7 +312,7 @@ CUnicode::textToUTF8(const CString& src, bool* errors) resetError(errors); // get length of multibyte string - UInt32 n = src.size() + 1; + UInt32 n = src.size(); size_t len = 0; mbstate_t state; memset(&state, 0, sizeof(state));