[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#54263: 29.0.50; color-values-from-color-spec accepts whitespace in r
From: |
Mattias Engdegård |
Subject: |
bug#54263: 29.0.50; color-values-from-color-spec accepts whitespace in rgbi: specifications |
Date: |
Sun, 6 Mar 2022 12:12:08 +0100 |
6 mars 2022 kl. 11.45 skrev Philip Kaludercic <philipk@posteo.net>:
> (should (equal (color-values-from-color-spec "rgbi:0/0/0x0") nil))
>
> should be accepted or not. From looking at xfaces-tests.el I was
> surprised to see that the exponential notation was intentional, but
> there was no comment or test on the un-lispy 0x... notation that strtod
> allows.
We could disallow hex floats (such as 0x1 or 0XDEFP-16) too, but whether they
are un-lispy or not should have no bearing on our decision because we are
parsing an external representation that doesn't come from the Lisp world.
Finding an authoritative source for the rgbi: format proved elusive but it
doesn't seem that X11 or NS allow hex floats so let's reject them. New patch
attached.
0001-Don-t-accept-whitespace-or-hex-floats-in-rgbi-colour.patch
Description: Binary data