Bug 196 : Hex values longer or shorter than 6 characters produce strange error
Last modified: 2008-06-12 12:01




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P4
Severity:
normal

 

Reporter:
magnos
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2005-11-01 14:51
demo code:

int a;
void setup()
{
a = #FF000;
}
Additional Comment #1 From fry 2005-11-01 14:53
that's an awesome error message. somehow it's burping up the code that it's
using to parse that stuff.
Additional Comment #2 From fry 2005-11-01 14:54
oh, and thanks for filing the report here with an example, much 'preciated.
Additional Comment #3 From magnos 2005-11-01 15:10
Yeah the error burp got me also irritated, but its pretty handy, isnt it :)
Tells you where to look
Additional Comment #4 From fry 2005-11-22 13:01
the fix needs to happen inside app/preproc/pde.g:

in there, the code that parses to see if a web color is in use:
{ Preferences.getBoolean("preproc.web_colors") &&
w.getText().length() == 6 }? // must be exactly 6 hex digits

needs to return a proper error if it doesn't read properly, seems to be
falling through instead and coughing up the weird error.
Additional Comment #5 From fry 2007-12-26 10:53
*** Bug 706 has been marked as a duplicate of this bug. ***
Additional Comment #6 From fry 2008-06-12 12:01
fixed for 0142.