summaryrefslogtreecommitdiffstats
path: root/generic/tkRectOval.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkRectOval.c')
-rw-r--r--generic/tkRectOval.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c
index 630737c..c41387c 100644
--- a/generic/tkRectOval.c
+++ b/generic/tkRectOval.c
@@ -348,10 +348,8 @@ RectOvalCoords(
*/
if (objc != 4) {
- char buf[64 + TCL_INTEGER_SPACE];
-
- sprintf(buf, "wrong # coordinates: expected 0 or 4, got %d", objc);
- Tcl_SetResult(interp, buf, TCL_VOLATILE);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "wrong # coordinates: expected 0 or 4, got %d", objc));
return TCL_ERROR;
}