Code

bug 185761: crash when editing text with the text & font dialog due to reading off...
authorcyreve <cyreve@users.sourceforge.net>
Sat, 26 Jan 2008 13:19:14 +0000 (13:19 +0000)
committercyreve <cyreve@users.sourceforge.net>
Sat, 26 Jan 2008 13:19:14 +0000 (13:19 +0000)
src/libnrtype/TextWrapper.cpp

index ce8797322b1bd6790e669c2ea137bfa830e0866f..c818bcab3526fb7deb9f2f523589f6cae141053f 100644 (file)
@@ -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;