[dev] [st PATCH 2/3] Use LEN(dc.col) instead of LEN(colorname).

From: noname <noname_AT_inventati.org>
Date: Sun, 19 Apr 2015 20:24:21 +0000

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
_AT_@ -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
Received on Sun Apr 19 2015 - 22:24:21 CEST

This archive was generated by hypermail 2.3.0 : Sun Apr 19 2015 - 22:36:17 CEST