]> git.eshelyaron.com Git - emacs.git/commit
More robust NS hex colour string parsing
authorMattias Engdegård <mattiase@acm.org>
Mon, 8 Jun 2020 11:06:51 +0000 (13:06 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 8 Jun 2020 11:24:29 +0000 (13:24 +0200)
commit64e25cde324b2e270acf82958abb59018e67f841
tree8648c8efadfa1d9208533094f3ea0e8ece95482e
parent46304c474c433a98ad55198e1fbdb0b1136645c1
More robust NS hex colour string parsing

Invalid arguments to color-values, such as "#abcdefg" or "#1234", or
valid ones like "#111222333", should not yield nonsense values.

* src/nsterm.m (ns_get_color):
Only accept "#RGB" strings with 1-4 digits per components, equal number
of digits each, and no trailing characters.  Parse 12-bit colours
correctly.
src/nsterm.m