diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-02-02 17:14:32 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-02-02 17:14:32 +0100 |
commit | 5dadc28ea784db1ba1f56c2ea8618d2db67af1c8 (patch) | |
tree | 808b2499b54563b3290f34d70d159b1024310873 /backend/plustek.c | |
parent | 5bb4cf12855ec0151de15d6c5a2354ff08766957 (diff) | |
parent | 3dade5db2a37543f19f0967901d8d80a52a1e459 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'backend/plustek.c')
-rw-r--r-- | backend/plustek.c | 13 |
1 files changed, 7 insertions, 6 deletions
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: |