From f3ea0fbc731aad1e61ae72b24e503378d9596fae Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 1 Apr 2004 16:53:30 +0000 Subject: Prevent endless loop --- src/sablotr.cpp | 4 ++-- 1 file 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& 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& 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 && -- cgit v1.2.3