![](https://secure.gravatar.com/avatar/8ac615df352a970211b0e3d94a307c6d.jpg?s=120&d=mm&r=g)
Author: victor.stinner Date: Fri Jul 30 22:35:57 2010 New Revision: 83303 Log: fix filename match in get_sourcefile() Modified: python/branches/import_unicode/Python/import.c Modified: python/branches/import_unicode/Python/import.c ============================================================================== --- python/branches/import_unicode/Python/import.c (original) +++ python/branches/import_unicode/Python/import.c Fri Jul 30 22:35:57 2010 @@ -1452,10 +1452,10 @@ file = PyUnicode_AS_UNICODE(fileobj); /* match '*.py?' */ - if (4 <= len - && file[len-3] == '.' - && (file[len-2] == 'p' || file[len-2] == 'P') - && (file[len-1] == 'y' || file[len-1] == 'Y')) { + if (5 <= len + && file[len-4] == '.' + && (file[len-3] == 'p' || file[len-3] == 'P') + && (file[len-2] == 'y' || file[len-2] == 'Y')) { Py_INCREF(fileobj); return fileobj; }
participants (1)
-
victor.stinner