diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-07 17:09:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-07 17:09:53 +0300 |
commit | 926201acf8f451bd9a240013ba972a8488c43abe (patch) | |
tree | b58ec9979ebb947d39069330ee9dba91c0173ded /source/blender/python/generic | |
parent | 73fbc0f02d37b1477dc7f275b734d49834b7af61 (diff) |
- string copy without .py wasnt terminating the string
- console import autocomplete wasnt including modules defined in C like BGL, Mathutils
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r-- | source/blender/python/generic/bpy_internal_import.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c index d3b8b19693f..002467687c4 100644 --- a/source/blender/python/generic/bpy_internal_import.c +++ b/source/blender/python/generic/bpy_internal_import.c @@ -74,8 +74,9 @@ PyObject *bpy_text_import( Text *text ) } } - len= strlen(text->id.name+2) - 3; + len= strlen(text->id.name+2); strncpy(modulename, text->id.name+2, len); + modulename[len - 3]= '\0'; /* remove .py */ return PyImport_ExecCodeModule(modulename, text->compiled); } |