This commit is contained in:
gb 2023-12-05 10:41:47 +08:00
commit 8fa74c4f06
1 changed files with 4 additions and 1 deletions

View File

@ -1863,7 +1863,10 @@ void huagao_ds::init_support_caps(void)
count /= 2; count /= 2;
} }
SET_SANE_OPT_EX(ret, scanner_, scan_count, &count); SET_SANE_OPT_EX(ret, scanner_, scan_count, &count);
return ret == SCANNER_ERR_OK ? success() : badValue(); if (ret == SCANNER_ERR_OK)
return success();
else
return {ReturnCode::Failure, huagao_ds::condition_code_from_hg_error(ret)};
} }
std::vector<int> count; std::vector<int> count;
Int16 tmp_count = 0; Int16 tmp_count = 0;