epson2: try to avoid a division by zero

merge-requests/1/head
Alessandro Zummo 2011-02-05 18:13:24 +01:00
rodzic 66716a5666
commit 71f68035b3
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -1342,6 +1342,9 @@ e2_init_parameters(Epson_Scanner * s)
#endif
}
if (s->params.bytes_per_line == 0)
return SANE_STATUS_INVAL;
/*
* Calculate correction for line_distance in D1 scanner:
* Start line_distance lines earlier and add line_distance lines at the end