diff options
| author | nyamatongwe <devnull@localhost> | 2005-04-18 07:11:07 +0000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2005-04-18 07:11:07 +0000 |
| commit | 3d44c8ff8ba7a295defb0514ea75c7eb71ee9347 (patch) | |
| tree | e7fa146390f3b34995869268a42c037a0b19c806 | |
| parent | 32830d9005508f416cf0d90687257c0ef541d102 (diff) | |
| download | scintilla-mirror-3d44c8ff8ba7a295defb0514ea75c7eb71ee9347.tar.gz | |
Make code work as documented by treating -1 as special length for encoding
as UTF-8 rather than 0.
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 2dade05aa..fa268b2cf 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -833,7 +833,7 @@ int ScintillaGTK::TargetAsUTF8(char *text) { // Translates a nul terminated UTF8 string into the document encoding. // Return the length of the result in bytes. int ScintillaGTK::EncodedFromUTF8(char *utf8, char *encoded) { - int inputLength = lengthForEncode ? lengthForEncode : strlen(utf8); + int inputLength = (lengthForEncode >= 0) ? lengthForEncode : strlen(utf8); if (IsUnicodeMode()) { if (encoded) { memcpy(encoded, utf8, inputLength); |
