diff options
author | Stef <stef@ws.local> | 2004-04-01 16:53:30 +0000 |
---|---|---|
committer | Stef <stef@ws.local> | 2004-04-01 16:53:30 +0000 |
commit | bbb16c7548adf6c9d7a5c4b0032380d35a835148 (patch) | |
tree | 179a2d95376891b73f5028e5d18bee3602d9de7b | |
parent | 5c2430e6896de2139bf8e5e467dd3a6ba527f46a (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 && |