[sane-devel] Bugfix in Epson USB config
Ron Cemer
ron@roncemer.com
Thu, 13 Feb 2003 15:20:21 -0800
This is a multi-part message in MIME format.
--------------030902090002010806050503
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
The attached patch fixes a bug in the Epson driver when parsing
hexadecimal vendor and product ids from the epson.conf file. The sscanf
was using %d (which only accepts decimal arguments), so I changed it to
%i (which also accepts hexadecimal arguments).
Thanks!
Ron
--------------030902090002010806050503
Content-Type: text/plain;
name="epson_usb_vendor_device.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="epson_usb_vendor_device.diff"
--- backend/epson.c.orig 2002-12-31 13:20:33.000000000 -0800
+++ backend/epson.c 2003-02-13 14:50:15.000000000 -0800
@@ -2231,7 +2231,7 @@
if( !len)
continue; /* ignore empty lines */
- if (sscanf(line, "usb %d %d", &vendor, &product) == 2)
+ if (sscanf(line, "usb %i %i", &vendor, &product) == 2)
{
sanei_usb_attach_matching_devices(line, attach_one_usb);
}
--------------030902090002010806050503--