From: cyreve Date: Sat, 26 Jan 2008 13:19:14 +0000 (+0000) Subject: bug 185761: crash when editing text with the text & font dialog due to reading off... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=152b307e6fc76ff81bf0880b8bdb4d627c98fdc3;p=inkscape.git 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) --- 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;