]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add option descirptor count of options
authorBastian Dehn <hhaalo@arcor.de>
Thu, 25 Jan 2024 18:13:19 +0000 (19:13 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 25 Jan 2024 18:13:19 +0000 (19:13 +0100)
src/kds_s2000w_net.c

index 869e1a69080440ad17db496d922609bdbe2a8850..2f5a9c2dae824658c476edc15aaa23ada7b2a6e5 100644 (file)
@@ -74,8 +74,19 @@ const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor(
 {
        current_state* state = kds_s2000w_handler_current_state();
        switch (option) {
+               case 0:
+                       optionDescripor->name = "";
+                       optionDescripor->title = "";
+                       optionDescripor->desc = "";
+                       optionDescripor->type = SANE_TYPE_INT;
+                       optionDescripor->unit = SANE_UNIT_NONE;
+                       optionDescripor->size = sizeof(SANE_Int);
+                       optionDescripor->cap = 0;
+                       optionDescripor->constraint_type = SANE_CONSTRAINT_NONE;
+                       optionDescripor->constraint.string_list = NULL;
+                       break;
                default:
-                       optionDescripor->name = "count of options";
+                       optionDescripor->name = "";
                        optionDescripor->title = "count of options";
                        optionDescripor->desc = "count of options";
                        optionDescripor->type = state->type;