From ffa8801644a7d53cc1c785e3450f794c07a14eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 2 Feb 2020 17:13:01 +0100 Subject: New upstream version 1.0.29 --- backend/plustek.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'backend/plustek.c') diff --git a/backend/plustek.c b/backend/plustek.c index e1d9e09..eaddbd3 100644 --- a/backend/plustek.c +++ b/backend/plustek.c @@ -1085,14 +1085,14 @@ init_options( Plustek_Scanner *s ) /* scanner buttons */ for( i = OPT_BUTTON_0; i <= OPT_BUTTON_LAST; i++ ) { - char name [12]; - char title [128]; + char buf [128]; - sprintf (name, "button %d", i - OPT_BUTTON_0); - sprintf (title, "Scanner button %d", i - OPT_BUTTON_0); + snprintf (buf, sizeof(buf), "button %d", i - OPT_BUTTON_0); + s->opt[i].name = strdup(buf); + + snprintf (buf, sizeof(buf), "Scanner button %d", i - OPT_BUTTON_0); + s->opt[i].title = strdup(buf); - s->opt[i].name = strdup(name); - s->opt[i].title = strdup(title); s->opt[i].desc = SANE_I18N("This option reflects the status " "of the scanner buttons."); s->opt[i].type = SANE_TYPE_BOOL; @@ -1916,6 +1916,7 @@ sane_control_option( SANE_Handle handle, SANE_Int option, case OPT_BUTTON_0: if(!s->calibrating) usb_UpdateButtonStatus(s); + // fall through case OPT_BUTTON_1: case OPT_BUTTON_2: case OPT_BUTTON_3: -- cgit v1.2.3