[sane-devel] Bugfix in Epson USB config

Ron Cemer ron at roncemer.com
Thu Feb 13 23:20:21 GMT 2003


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
-------------- next part --------------
--- 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);
 			}


More information about the sane-devel mailing list