From 282f31250601aafa518aa9a561b55faf09c27846 Mon Sep 17 00:00:00 2001 From: ntrifunovic Date: Tue, 22 May 2012 22:55:47 +0000 Subject: [PATCH] Fix for the bug 3506114: potential crash in replace_invalid git-svn-id: http://svn.code.sf.net/p/utfcpp/code@130 a809a056-fc17-0410-9590-b4f493f8b08e --- source/utf8/checked.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utf8/checked.h b/source/utf8/checked.h index 8c59c83..3b00644 100644 --- a/source/utf8/checked.h +++ b/source/utf8/checked.h @@ -118,7 +118,7 @@ namespace utf8 utf8::append (replacement, out); ++start; // just one replacement mark for the sequence - while (utf8::internal::is_trail(*start) && start != end) + while (start != end && utf8::internal::is_trail(*start)) ++start; break; }