[sane-devel] Error during getting option values

Peter Fales psfales@fales-lorenz.net
Thu, 23 Jun 2005 06:57:17 -0500


On Thu, Jun 23, 2005 at 04:27:59PM +0530, Mohit Kumar wrote:
>       unsigned long value;    
...
> 	{
> 		status = sane_control_option(handle,index,SANE_ACTION_GET_VALUE,(void*)value,0);

Value is uninitialized at this point.  I believe you want to pass its
address, not the value of the variable, i.e.:

 status = sane_control_option(handle,index,SANE_ACTION_GET_VALUE,(void*)&value,0);
                                                                       ^

--
Peter Fales