[sane-devel] Programming getting a SIGSEGV
m. allan noah
Mon, 20 Jun 2005 09:17:28 -0400 (EDT)
mohit, perhaps you mean
//now for color
note the braces.
On Mon, 20 Jun 2005, Mohit Kumar wrote:
> Hi All,
> I have the following piece of code: (kindly ignore the declarations..)
> options = sane_get_option_descriptor(handle, index); //index points to
> mode option
> int j=0;
> if(strcmp(options->constraint.string_list[j] == "Grayscale"
> SANE_Status status =
> //now for color
> Now j=0 return Lineart, j=1 returns Halftone, j=2 returns Grayscale.
> But for j=3 (it should have returned "Color"), program crashes and it
> says cannot access memory at address 0x25.
> I have a HP ScanJet 6200C/6250C and I have verified it has all the four modes.
> Am i doing something wrong? I cannot understand why the fourth value
> is giving me problems while the first three have gone correct?
> sane-devel mailing list: firstname.lastname@example.org
> Unsubscribe: Send mail with subject "unsubscribe your_password"
> to email@example.com
"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera