summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Buffer.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2010-12-06 18:22:22 +0000
committerMatthias Melcher <fltk@matthiasm.com>2010-12-06 18:22:22 +0000
commit1bac8a0ccae1f8993714e795d7da2e78245182d2 (patch)
tree9bde4789126d3e19b4baa98c76b9268c7c896624 /src/Fl_Text_Buffer.cxx
parent06e5a163cd6fffa89e5e941fbbc8f9d5ee9fe72d (diff)
Fixed crashes when Fl_Text_* detects illegal UTF 8 sequences. Widgets will not do any further processing but just jump over the character. Screen representation depends largely on whatever the underlying OS does with those sequences, but I feel that this is out of the scope of this library. (STR 2348)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7965 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Buffer.cxx')
-rw-r--r--src/Fl_Text_Buffer.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx
index c70ae1692..d1aea36f1 100644
--- a/src/Fl_Text_Buffer.cxx
+++ b/src/Fl_Text_Buffer.cxx
@@ -1025,7 +1025,7 @@ int Fl_Text_Buffer::search_forward(int startPos, const char *searchString,
*foundPos = startPos;
return 1;
}
- int l = fl_utf8len(c);
+ int l = fl_utf8len1(c);
if (memcmp(sp, address(bp), l))
break;
sp += l; bp += l;
@@ -1077,7 +1077,7 @@ int Fl_Text_Buffer::search_backward(int startPos, const char *searchString,
*foundPos = startPos;
return 1;
}
- int l = fl_utf8len(c);
+ int l = fl_utf8len1(c);
if (memcmp(sp, address(bp), l))
break;
sp += l; bp += l;
@@ -1602,7 +1602,7 @@ int Fl_Text_Buffer::prev_char(int pos) const
int Fl_Text_Buffer::next_char(int pos) const
{
IS_UTF8_ALIGNED2(this, (pos))
- int n = fl_utf8len(byte_at(pos));
+ int n = fl_utf8len1(byte_at(pos));
pos += n;
if (pos>=mLength)
return mLength;