From 152b307e6fc76ff81bf0880b8bdb4d627c98fdc3 Mon Sep 17 00:00:00 2001 From: cyreve Date: Sat, 26 Jan 2008 13:19:14 +0000 Subject: [PATCH] bug 185761: crash when editing text with the text & font dialog due to reading off the end of an array (and then discarding the result) --- src/libnrtype/TextWrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libnrtype/TextWrapper.cpp b/src/libnrtype/TextWrapper.cpp index ce8797322..c818bcab3 100644 --- a/src/libnrtype/TextWrapper.cpp +++ b/src/libnrtype/TextWrapper.cpp @@ -691,7 +691,7 @@ void text_wrapper::MakeTextBoundaries(PangoLogAttr *pAttrs, int nAttr) last_s_st = i; } // paragraphs - if ( uni32_text[i] == '\n' || uni32_text[i] == '\r' || i == nAttr ) { // too simple to be true? + if ( i == nAttr || uni32_text[i] == '\n' || uni32_text[i] == '\r' ) { // too simple to be true? nbs.type = nbe.type = bnd_para; nbs.uni_pos = last_p_st; nbe.uni_pos = i + 1; -- 2.30.2