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>2007-04-21 00:15:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-04-21 00:15:54 +0400
commitcbfeab7e45a6b22a1140a369085f641d20d3e268 (patch)
tree3da19a9380c0eeed5f81e142ceeeeb50ceaa4c9a /source/blender/src/filesel.c
parentc7b1e5c11df31c437834088fc056a27fe852bfe1 (diff)
dumb mistake, wasnt UN-setting the flag to zero LIB_APPEND_TAX
Fixed an error that could cause a possible memory corruption, library filenames were being used to make a menu, but memory was only being allocated FILE_MAX per lib rather then FILE_MAXDIR+FILE_MAX, since lib->name is the full path. was also doing lib->name+2 which isnt needed for a path.
Diffstat (limited to 'source/blender/src/filesel.c')
-rw-r--r--source/blender/src/filesel.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c
index 3a2e9414354..91c629dda75 100644
--- a/source/blender/src/filesel.c
+++ b/source/blender/src/filesel.c
@@ -1151,10 +1151,10 @@ static char *library_string(void)
int nr=0, tot= BLI_countlist(&G.main->library);
if(tot==0) return NULL;
- str= MEM_callocN(tot*(FILE_MAX), "filesel lib menu");
+ str= MEM_callocN(tot*(FILE_MAXDIR+FILE_MAX), "filesel lib menu");
for(tot=0, lib= G.main->library.first; lib; lib= lib->id.next, nr++) {
- tot+= sprintf(str+tot, "%s %%x%d|", lib->name+2, nr);
+ tot+= sprintf(str+tot, "%s %%x%d|", lib->name, nr);
}
return str;
}
@@ -2422,8 +2422,7 @@ static void do_library_append(SpaceFile *sfile)
all_local(lib, 1);
/* important we unset, otherwise these object wont
* link into other scenes from this blend file */
- flag_all_listbases_ids(LIB_APPEND_TAG, 1);
-
+ flag_all_listbases_ids(LIB_APPEND_TAG, 0);
}
DAG_scene_sort(G.scene);