diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c index 65c8042c5..8ed985e6c 100644 --- a/unix/tkUnixButton.c +++ b/unix/tkUnixButton.c @@ -293,16 +293,15 @@ TkpDrawCheckIndicator( } memcpy(svgDataCopy, svgDataPtr, svgDataLen); svgDataCopy[svgDataLen] = '\0'; - svgDataPtr = svgDataCopy; /* * Update the colors within svgDataCopy */ - darkColorPtr = strstr(svgDataPtr, "DARKKK"); - lightColorPtr = strstr(svgDataPtr, "LIGHTT"); - interiorColorPtr = strstr(svgDataPtr, "INTROR"); - indicatorColorPtr = strstr(svgDataPtr, "INDCTR"); + darkColorPtr = strstr(svgDataCopy, "DARKKK"); + lightColorPtr = strstr(svgDataCopy, "LIGHTT"); + interiorColorPtr = strstr(svgDataCopy, "INTROR"); + indicatorColorPtr = strstr(svgDataCopy, "INDCTR"); if (darkColorPtr != NULL) { memcpy(darkColorPtr, darkColorStr, 6); diff --git a/win/tkWinButton.c b/win/tkWinButton.c index 9734f59bc..43d536818 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.c @@ -455,18 +455,17 @@ TkpDrawIndicator( } memcpy(svgDataCopy, svgDataPtr, svgDataLen); svgDataCopy[svgDataLen] = '\0'; - svgDataPtr = svgDataCopy; /* * Update the colors within svgDataCopy */ - topOuterColorPtr = strstr(svgDataPtr, "a0a0a0"); - btmOuterColorPtr = strstr(svgDataPtr, "eeeeee"); - topInnerColorPtr = strstr(svgDataPtr, "696969"); - btmInnerColorPtr = strstr(svgDataPtr, "e3e3e3"); - interiorColorPtr = strstr(svgDataPtr, "ffffff"); - checkColorPtr = strstr(svgDataPtr, "000000"); + topOuterColorPtr = strstr(svgDataCopy, "a0a0a0"); + btmOuterColorPtr = strstr(svgDataCopy, "eeeeee"); + topInnerColorPtr = strstr(svgDataCopy, "696969"); + btmInnerColorPtr = strstr(svgDataCopy, "e3e3e3"); + interiorColorPtr = strstr(svgDataCopy, "ffffff"); + checkColorPtr = strstr(svgDataCopy, "000000"); assert(topOuterColorPtr); assert(btmOuterColorPtr);