Issue #12342: Fix compilation on Mac OS X
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index f42f068..abbe0ec 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -993,7 +993,7 @@
                 PyErr_Format(PyExc_ValueError,
                              "character U+%x is above the range "
                              "(U+0000-U+FFFF) allowed by Tcl",
-                             inbuf[i]);
+                             ch);
                 ckfree(FREECAST outbuf);
                 return NULL;
 #endif