Issue #24268: Fix import naming when loading extension modules. Patch by Petr Viktorin.
diff --git a/Python/dynload_next.c b/Python/dynload_next.c
index c555b38..83a8b2b 100644
--- a/Python/dynload_next.c
+++ b/Python/dynload_next.c
@@ -40,7 +40,7 @@
const char *errString;
char errBuf[512];
- PyOS_snprintf(funcname, sizeof(funcname), "_%20s_%.200s", prefix, shortname);
+ PyOS_snprintf(funcname, sizeof(funcname), "_%.20s_%.200s", prefix, shortname);
#ifdef USE_DYLD_GLOBAL_NAMESPACE
if (NSIsSymbolNameDefined(funcname)) {