diff options
Diffstat (limited to 'generic/tkCanvLine.c')
-rw-r--r-- | generic/tkCanvLine.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index 41a3d25..cce3460 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -1005,10 +1005,11 @@ LineInsert( newCoordPtr[i+objc] = linePtr->coordPtr[i]; } if (linePtr->coordPtr) { - ckfree((char *)linePtr->coordPtr); + ckfree((char *) linePtr->coordPtr); } linePtr->coordPtr = newCoordPtr; - linePtr->numPoints = (length + objc)/2; + length += objc; + linePtr->numPoints = length / 2; if ((length>3) && (state != TK_STATE_HIDDEN)) { /* |