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>2011-02-12 19:54:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-12 19:54:24 +0300
commit55f68c36574779ae2fac3652466584628b22c633 (patch)
treee2f55301dda8897bf17f8b8459229d8fa5a67816 /source/blender/blenkernel/intern/library.c
parent9eee1f962d49f14d92c8da4e677e4ee140f4f440 (diff)
fix for more warnings.
- modifier code was using sizeof() without knowing the sizeof the array when clearing the modifier type array. - use BLI_snprintf rather then sprintf where the size of the string is known. - particle drawing code kept a reference to stack float values (not a problem at the moment but would crash if accessed later).
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r--source/blender/blenkernel/intern/library.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 6eb5399404a..671f4d91922 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -920,7 +920,7 @@ static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, shor
BLI_dynstr_append(pupds, buf);
BLI_dynstr_append(pupds, id->name+2);
- sprintf(buf, "%%x%d", i+1);
+ BLI_snprintf(buf, sizeof(buf), "%%x%d", i+1);
BLI_dynstr_append(pupds, buf);
/* icon */
@@ -931,7 +931,7 @@ static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, shor
case ID_IM: /* fall through */
case ID_WO: /* fall through */
case ID_LA: /* fall through */
- sprintf(buf, "%%i%d", BKE_icon_getid(id) );
+ BLI_snprintf(buf, sizeof(buf), "%%i%d", BKE_icon_getid(id) );
BLI_dynstr_append(pupds, buf);
break;
default:
@@ -1128,7 +1128,7 @@ static int check_for_dupid(ListBase *lb, ID *id, char *name)
continue;
}
/* this format specifier is from hell... */
- sprintf(name, "%s.%.3d", left, nr);
+ BLI_snprintf(name, sizeof(id->name) - 2,"%s.%.3d", left, nr);
return 1;
}