diff options
author | Stef Walter <stef@memberwebs.com> | 2004-04-01 16:53:30 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-04-01 16:53:30 +0000 |
commit | f3ea0fbc731aad1e61ae72b24e503378d9596fae (patch) | |
tree | 179a2d95376891b73f5028e5d18bee3602d9de7b | |
parent | 7f4650080fed53e793c6b3754e6f24c13b8e4539 (diff) |
Prevent endless loop
-rw-r--r-- | src/sablotr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sablotr.cpp b/src/sablotr.cpp index a2d703a..47853cc 100644 --- a/src/sablotr.cpp +++ b/src/sablotr.cpp @@ -54,7 +54,7 @@ bool DOM::transcode16to8(const std::basic_string<wchar_t>& data, const wchar_t* c = data.length() ? data.data() : L""; const wchar_t* e = c + data.length(); - for( ; c != e; c++) + for( ; c < e; c++) { if(*c <= 0x007F) { @@ -88,7 +88,7 @@ bool DOM::transcode8to16(const std::basic_string<char>& data, const char* c = data.length() ? data.data() : ""; const char* e = c + data.length(); - for( ; c != e; c++) + for( ; c < e; c++) { // First 4 bits set if((c[0] & 0xF8) == 0xF0 && |