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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-08-27 06:45:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-27 06:45:35 +0400
commit95c56115705d6851f7fd726612e57483d608e962 (patch)
treead0aabf829b3d2da149bbf26d403805ab9af164f /source
parent9ae67bf38036f15b39ba129bea61415d8cfb95ae (diff)
subtraction on unsigned values didnt work as intended for copying ID's.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/library.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 0b07f40cad6..76f114de97b 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -671,7 +671,7 @@ void *copy_libblock(void *rt)
assert(idn != NULL);
idn_len= MEM_allocN_len(idn);
- if(idn_len - sizeof(ID) > 0) {
+ if((ssize_t)idn_len - (ssize_t)sizeof(ID) > 0) { /* signed to allow neg result */
cp= (char *)id;
cpn= (char *)idn;
memcpy(cpn+sizeof(ID), cp+sizeof(ID), idn_len - sizeof(ID));