diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCanvas.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index eed2d5a..fa160b9 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvas.c,v 1.46.2.3 2010/01/18 21:20:09 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvas.c,v 1.46.2.4 2010/01/19 22:02:43 dkf Exp $ */ /* #define USE_OLD_TAG_SEARCH 1 */ @@ -3233,7 +3233,11 @@ TagSearchScanExpr( while (searchPtr->stringIndex < searchPtr->stringLength) { c = searchPtr->string[searchPtr->stringIndex++]; - if (expr->allocated == expr->index) { + /* + * Need two slots free at this point, not one. [Bug 2931374] + */ + + if (expr->index >= expr->allocated-1) { expr->allocated += 15; if (expr->uids) { expr->uids = (Tk_Uid *) |