a_colour_mux(): HORRIBLE FIX! Assign correct pointer (Χάρης Καραχριστιανίδης)..
commitf4574c5b7df7e35c8975936f843a46d54c4fed34
authorSteffen Nurpmeso <steffen@sdaoden.eu>
Fri, 17 Feb 2023 22:42:26 +0000 (17 23:42 +0100)
committerSteffen Nurpmeso <steffen@sdaoden.eu>
Fri, 17 Feb 2023 22:42:36 +0000 (17 23:42 +0100)
tree0281ddc223b402bcf535582c46ea06d43cdffbf4
parent5dc949eba0ba8592a4b99f6b5a936bb3069d14bd
a_colour_mux(): HORRIBLE FIX! Assign correct pointer (Χάρης Καραχριστιανίδης)..

The conditional pointer may either be some user string,
or a_COLOUR_TAG_IS_SPECIAL().  In both cases the "length"
may end up 0 (always in latter case), but we simply assign
the pointer to storage, storing a later invalidated pointer
instead of NIL in !IS_SPECIAL() cases!

This means that

  colour 256 sum-thread    fg=172 ''

will later crash (in at least optimized builds).
Luckily

  colour 256 sum-thread    fg=172

does not.
src/mx/colour.c