Browse Source

Fix to CharPointer_UTF8::operator--

tags/2021-05-28
jules 13 years ago
parent
commit
9fb57f7a05
1 changed files with 3 additions and 11 deletions
  1. +3
    -11
      modules/juce_core/text/juce_CharPointer_UTF8.h

+ 3
- 11
modules/juce_core/text/juce_CharPointer_UTF8.h View File

@@ -134,18 +134,10 @@ public:
/** Moves this pointer back to the previous character in the string. */
CharPointer_UTF8& operator--() noexcept
{
const char n = *--data;
int count = 0;
if ((n & 0xc0) == 0xc0)
{
int count = 3;
do
{
--data;
}
while ((*data & 0xc0) == 0xc0 && --count >= 0);
}
while ((*--data & 0xc0) == 0x80 && ++count < 4)
{}
return *this;
}


Loading…
Cancel
Save