summaryrefslogtreecommitdiffstats
path: root/apps/plugins/pdbox/pdbox-gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pdbox/pdbox-gui.c')
-rw-r--r--apps/plugins/pdbox/pdbox-gui.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/plugins/pdbox/pdbox-gui.c b/apps/plugins/pdbox/pdbox-gui.c
index 33d15ab661..f22999ff7c 100644
--- a/apps/plugins/pdbox/pdbox-gui.c
+++ b/apps/plugins/pdbox/pdbox-gui.c
@@ -224,6 +224,9 @@ unsigned int pd_gui_load_patch(struct pd_widget* wg, unsigned int max_widgets)
strtok_r(NULL, " ", &saveptr);
strncpy(wg->name, strtok_r(NULL, " ", &saveptr), sizeof(wg->name));
+ /* Reset value. */
+ wg->value = 0;
+
/* We got one more widget. */
wg++;
widgets++;
@@ -246,6 +249,9 @@ unsigned int pd_gui_load_patch(struct pd_widget* wg, unsigned int max_widgets)
strtok_r(NULL, " ", &saveptr);
strncpy(wg->name, strtok_r(NULL, " ", &saveptr), sizeof(wg->name));
+ /* Reset value. */
+ wg->value = 0;
+
/* We got one more widget. */
wg++;
widgets++;
@@ -269,6 +275,9 @@ unsigned int pd_gui_load_patch(struct pd_widget* wg, unsigned int max_widgets)
strtok_r(NULL, " ", &saveptr);
strncpy(wg->name, strtok_r(NULL, " ", &saveptr), sizeof(wg->name));
+ /* Reset value. */
+ wg->value = 0;
+
/* We got one more widget. */
wg++;
widgets++;
@@ -292,6 +301,9 @@ unsigned int pd_gui_load_patch(struct pd_widget* wg, unsigned int max_widgets)
strtok_r(NULL, " ", &saveptr);
strncpy(wg->name, strtok_r(NULL, " ", &saveptr), sizeof(wg->name));
+ /* Reset value. */
+ wg->value = 0;
+
/* We got one more widget. */
wg++;
widgets++;
@@ -316,6 +328,9 @@ unsigned int pd_gui_load_patch(struct pd_widget* wg, unsigned int max_widgets)
strncpy(wg->name, strtok_r(NULL, " ", &saveptr), sizeof(wg->name));
wg->max--;
+ /* Reset value. */
+ wg->value = 0;
+
/* We got one more widget. */
wg++;
widgets++;
@@ -340,6 +355,9 @@ unsigned int pd_gui_load_patch(struct pd_widget* wg, unsigned int max_widgets)
strncpy(wg->name, strtok_r(NULL, " ", &saveptr), sizeof(wg->name));
wg->max--;
+ /* Reset value. */
+ wg->value = 0;
+
/* We got one more widget. */
wg++;
widgets++;
@@ -364,6 +382,9 @@ unsigned int pd_gui_load_patch(struct pd_widget* wg, unsigned int max_widgets)
wg->min = 0;
wg->max = 1;
+ /* Reset value. */
+ wg->value = 0;
+
/* Clear timeout flag. */
wg->timeout = 0;