summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-30 15:19:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-30 15:19:44 (GMT)
commit191fecdc87592dfea94718bc716551c72f072c33 (patch)
tree4aa12b60fc6ad7ca4c19658d774dee4326ad165b /generic/tclUtil.c
parent784535a35c779f46886fe9a880b706c979efdd77 (diff)
downloadtcl-191fecdc87592dfea94718bc716551c72f072c33.zip
tcl-191fecdc87592dfea94718bc716551c72f072c33.tar.gz
tcl-191fecdc87592dfea94718bc716551c72f072c33.tar.bz2
Fix [0cb3554903]: macOS 13 SDK deprecates sprintf(). But better not use it on other platforms either.
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index aee2b15..d3e88d4 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -3320,9 +3320,9 @@ Tcl_PrintDouble(
*/
if (*precisionPtr == 0) {
- sprintf(dst, "e%+d", exponent);
+ snprintf(dst, TCL_DOUBLE_SPACE, "e%+d", exponent);
} else {
- sprintf(dst, "e%+03d", exponent);
+ snprintf(dst, TCL_DOUBLE_SPACE, "e%+03d", exponent);
}
} else {
/*