From 55871f04bf0ac1cf0c7b1efd82780b4bf979d4f0 Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Tue, 26 May 2015 21:48:17 +1000 Subject: Issue #24285: fix importing extensions from packages --- Python/importdl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/importdl.c') diff --git a/Python/importdl.c b/Python/importdl.c index bb90391c0b..579d2c5fad 100644 --- a/Python/importdl.c +++ b/Python/importdl.c @@ -45,7 +45,7 @@ get_encoded_name(PyObject *name, const char **hook_prefix) { if (lastdot < -1) { return NULL; } else if (lastdot >= 0) { - tmp = PyUnicode_Substring(name, lastdot, name_len); + tmp = PyUnicode_Substring(name, lastdot + 1, name_len); if (tmp == NULL) return NULL; name = tmp; -- cgit v1.2.1