From af7ed311eda71a51e2092fe565b4b2bbb25cc3a5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 11 Jul 2015 22:41:34 +0200 Subject: [PATCH] Fix wx2stclen() return values after upgrade to Scintilla 3.5.5. The fix to the length allocated for the buffer (which was off by 1) in wx2stc() in 9f81ac16f01c4c643bb3c8a12227e93dd1947146 exposed another bug, which used to compensate for that one, in wx2stclen(), so fix it too. See #16776. --- include/wx/stc/private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/stc/private.h b/include/wx/stc/private.h index 3624bb779f..f48a037894 100644 --- a/include/wx/stc/private.h +++ b/include/wx/stc/private.h @@ -28,7 +28,7 @@ extern wxCharBuffer wx2stc(const wxString& str); // just to compute the length. inline size_t wx2stclen(const wxString& WXUNUSED(str), const wxCharBuffer& buf) { - return buf.length() - 1; + return buf.length(); } #else // not UNICODE