Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-12-07 17:09:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-07 17:09:53 +0300
commit926201acf8f451bd9a240013ba972a8488c43abe (patch)
treeb58ec9979ebb947d39069330ee9dba91c0173ded /source/blender/python/generic/bpy_internal_import.c
parent73fbc0f02d37b1477dc7f275b734d49834b7af61 (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/bpy_internal_import.c')
-rw-r--r--source/blender/python/generic/bpy_internal_import.c3
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);
}