Skip to content
Tcl Source Code View Ticket
Login

View Ticket

backwards test in newcolor()

Closed / Fixeda3c3508599b32dfda5e83698aa9e301273b5f7cfCreated 11 years agoUpdated 11 years ago
Descriptionplain2015-09-16 17:22:03
I was just going through deltas between Tcl's regexp code and Postgres' version of the code, and I found what appears to be a typo in your version of the fix for the color-overflow problem.  In newcolor(), regc_color.c line 262 in 8.6.4, you have:

	if (n < MAX_COLOR + 1) {
	    n = MAX_COLOR + 1;
	}

We have that test as "if (n > MAX_COLOR + 1)" which I think is correct: the point is to limit the value of n to MAX_COLOR+1, not to force it up to that instantly.

The effect of this is just some inefficiency, ie colormaps will bloat to 32K entries as soon as they exceed NINLINECDS, but still it's a bug.
Referenced by3
dgpplain2015-09-21 17:29:49
Fixed on tgl-pg-re branch.
dgpplain2015-09-21 18:52:58
Fixed for 8.5.19 and 8.6.5
Log in (anonymous is fine) to add a comment.