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_graph
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_graph')
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index c1dfa97a508..9e1ff82c20d 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -647,7 +647,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
uiItemL(row, "Driver Value:", ICON_NONE);
- sprintf(valBuf, "%.3f", driver->curval);
+ BLI_snprintf(valBuf, sizeof(valBuf), "%.3f", driver->curval);
uiItemL(row, valBuf, ICON_NONE);
}
@@ -702,18 +702,18 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
graph_panel_driverVar__transChan(box, ale->id, dvar);
break;
}
-
- /* value of variable */
- if (driver->flag & DRIVER_FLAG_SHOWDEBUG) {
- char valBuf[32];
-
- box= uiLayoutBox(col);
- row= uiLayoutRow(box, 1);
+
+ /* value of variable */
+ if (driver->flag & DRIVER_FLAG_SHOWDEBUG) {
+ char valBuf[32];
+
+ box= uiLayoutBox(col);
+ row= uiLayoutRow(box, 1);
uiItemL(row, "Value:", ICON_NONE);
- sprintf(valBuf, "%.3f", dvar->curval);
+ BLI_snprintf(valBuf, sizeof(valBuf), "%.3f", dvar->curval);
uiItemL(row, valBuf, ICON_NONE);
- }
+ }
}
/* cleanup */