Revision: 1605 http://svn.sourceforge.net/geany/?rev=1605&view=rev Author: eht16 Date: 2007-06-09 05:57:04 -0700 (Sat, 09 Jun 2007)
Log Message: ----------- Prevent hang if searching for a regular expression fails (closes #1733676).
Modified Paths: -------------- trunk/ChangeLog trunk/src/document.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-06-09 12:17:18 UTC (rev 1604) +++ trunk/ChangeLog 2007-06-09 12:57:04 UTC (rev 1605) @@ -4,6 +4,8 @@ Apply from François Cami and Guillaume Duviol to improve replacement of tabs by spaces (thank you). * src/templates.c: Change PHP short open tag to the full open tag. + * src/document.c: Prevent hang if searching for a regular expression + fails (closes #1733676).
2007-06-08 Frank Lanitz frank@frank.uvena.de
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2007-06-09 12:17:18 UTC (rev 1604) +++ trunk/src/document.c 2007-06-09 12:57:04 UTC (rev 1605) @@ -1320,9 +1320,9 @@ while (TRUE) { search_pos = sci_find_text(doc_list[idx].sci, flags, &ttf); - if (search_pos == -1) + find_len = ttf.chrgText.cpMax - ttf.chrgText.cpMin; + if (search_pos == -1 || find_len == 0) break; - find_len = ttf.chrgText.cpMax - ttf.chrgText.cpMin;
if (search_pos + find_len > end) break; //found text is partly out of range
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.