LEN(colorname) may be below 256 for some configurations.
---
 st.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/st.c b/st.c
index 759a3b1..0b2997e 100644
--- a/st.c
+++ b/st.c
@@ -2906,7 +2906,7 @@ xsetcolorname(int x, const char *name) {
        XRenderColor color = { .alpha = 0xffff };
        Color ncolor;
 
-       if(!BETWEEN(x, 0, LEN(colorname)))
+       if(!BETWEEN(x, 0, LEN(dc.col)))
                return 1;
 
        if(!name) {
-- 
1.8.4


Reply via email to