another follow-up bit for X11

This commit is contained in:
nhmall
2025-06-30 09:21:17 -04:00
parent 1ece615eb2
commit fed5be6943

View File

@@ -1564,14 +1564,16 @@ X11_make_gc(
} else } else
#endif #endif
{ {
if (color >= CLR_MAX) { uint32 nhcolor = COLORVAL(color); /* strip flag bits */
color -= CLR_MAX;
if (nhcolor >= CLR_MAX) {
nhcolor -= CLR_MAX;
cur_inv = !cur_inv; cur_inv = !cur_inv;
} }
ggc = (iflags.use_color ggc = (iflags.use_color
? (cur_inv ? (cur_inv
? text_map->inv_color_gcs[COLORVAL(color)] ? text_map->inv_color_gcs[nhcolor]
: text_map->color_gcs[COLORVAL(color)]) : text_map->color_gcs[nhcolor])
: (cur_inv : (cur_inv
? text_map->inv_copy_gc ? text_map->inv_copy_gc
: text_map->copy_gc)); : text_map->copy_gc));