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>2012-01-11 16:33:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-11 16:33:51 +0400
commite10fd04db0bdcdbc326fce6cddc8af1179a5de5c (patch)
treea8f3a08b35101e30a0e5d4d1a94e0b2ef50c7122 /source/blender/editors/space_logic/logic_window.c
parentdcef7346eb3f16c27b3f952b6452396e66f5e996 (diff)
use BLI_strncpy and BLI_snprintf when the size of the string is known.
fix for sequencer unique naming which was missed with string length update.
Diffstat (limited to 'source/blender/editors/space_logic/logic_window.c')
-rw-r--r--source/blender/editors/space_logic/logic_window.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index 09a8ebc8770..2c1e7a0c546 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -3580,7 +3580,7 @@ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr, int xco, i
bController *cont= (bController *)ptr->data;
char state[3];
- sprintf(state, "%d", RNA_int_get(ptr, "states"));
+ BLI_snprintf(state, sizeof(state), "%d", RNA_int_get(ptr, "states"));
box= uiLayoutBox(layout);
row= uiLayoutRow(box, 0);
@@ -4497,7 +4497,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
RNA_pointer_create(NULL, &RNA_SpaceLogicEditor, slogic, &logic_ptr);
idar= get_selected_and_linked_obs(C, &count, slogic->scaflag);
- sprintf(uiblockstr, "buttonswin %p", (void *)ar);
+ BLI_snprintf(uiblockstr, sizeof(uiblockstr), "buttonswin %p", (void *)ar);
block= uiBeginBlock(C, ar, uiblockstr, UI_EMBOSS);
uiBlockSetHandleFunc(block, do_logic_buts, NULL);
@@ -4815,7 +4815,7 @@ void logic_buttons(bContext *C, ARegion *ar)
if(ob==NULL) return;
// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
- sprintf(numstr, "buttonswin %p", (void *)ar);
+ BLI_snprintf(numstr, sizeof(numstr), "buttonswin %p", (void *)ar);
block= uiBeginBlock(C, ar, numstr, UI_EMBOSS);
uiBlockSetHandleFunc(block, do_logic_buts, NULL);