diff --git generic/tclStringObj.c generic/tclStringObj.c
index 7fbf77a711..537ae97fbf 100644
--- generic/tclStringObj.c
+++ generic/tclStringObj.c
@@ -3130,12 +3130,16 @@ AppendPrintfToObjVA(
 
 		break;
 	    }
+	    case 'p':
+		if (sizeof(size_t) == sizeof(Tcl_WideInt)) {
+		    size = 2;
+		}
+		/* FALLTHRU */
 	    case 'c':
 	    case 'i':
 	    case 'u':
 	    case 'd':
 	    case 'o':
-	    case 'p':
 	    case 'x':
 	    case 'X':
 		seekingConversion = 0;
