You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2010/12/08 03:19:21 UTC

[lucy-commits] svn commit: r1043281 - /incubator/lucy/trunk/core/Lucy/Highlight/Highlighter.c

Author: marvin
Date: Wed Dec  8 02:19:21 2010
New Revision: 1043281

URL: http://svn.apache.org/viewvc?rev=1043281&view=rev
Log:
LUCY-126:
Fix an incorrect argument (an offset was being passed to a function that
expected a length).  This caused Highlighter to truncate an excerpt
incorrectly in some cases, potentially excluding all relevant material and
producing an inappropriate excerpt.

Modified:
    incubator/lucy/trunk/core/Lucy/Highlight/Highlighter.c

Modified: incubator/lucy/trunk/core/Lucy/Highlight/Highlighter.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/core/Lucy/Highlight/Highlighter.c?rev=1043281&r1=1043280&r2=1043281&view=diff
==============================================================================
--- incubator/lucy/trunk/core/Lucy/Highlight/Highlighter.c (original)
+++ incubator/lucy/trunk/core/Lucy/Highlight/Highlighter.c Wed Dec  8 02:19:21 2010
@@ -314,7 +314,7 @@ Highlighter_raw_excerpt(Highlighter *sel
             else {
                 uint32_t chars_left = last_edge - start;
                 if (   chars_left > min_len 
-                    && S_has_heat(heat_map, start, last_edge)
+                    && S_has_heat(heat_map, start, chars_left)
                 ) {
                     found_ending_edge = true;
                     end = last_edge;