gparamspecs - signed min/max backwards?



I was perusing through gparamspecs.c and found something that
struck me as odd.  It seems that the minimum and maximum values
for signed types are incorrect.   Here's the code tidbit for signed
char's:

static void
param_char_init (GParamSpec *pspec)
{
  GParamSpecChar *cspec = G_PARAM_SPEC_CHAR (pspec);

  cspec->minimum = 0x7f;
  cspec->maximum = 0x80;
  cspec->default_value = 0;
}

By signed notation, 0x7f = 127 and 0x80 = -128, correct?  If so,
then, signed ints and longs are also incorrectly parameterized.

Carl "Krawl" Armstrong





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]