---
st.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/st.c b/st.c
index 46cf2da..9c34a5b 100644
--- a/st.c
+++ b/st.c
@@ -38,9 +38,8 @@
/* macros */
#define IS_SET(flag) ((term.mode & (flag)) != 0)
-#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == '\177')
#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f))
-#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c))
+#define ISCONTROL(c) ((c) < 0x1f || (c) == '\177' || ISCONTROLC1(c))
#define ISDELIM(u) (utf8strchr(worddelimiters, u) != NULL)
enum term_mode {
@@ -1326,7 +1325,7 @@ tdefcolor(int *attr, int *npar, int l)
g = attr[*npar + 3];
b = attr[*npar + 4];
*npar += 4;
- if (!BETWEEN(r, 0, 255) || !BETWEEN(g, 0, 255) || !BETWEEN(b,
0, 255))
+ if (r > 255 || g > 255 || b > 255)
fprintf(stderr, "erresc: bad rgb color (%u,%u,%u)\n",
r, g, b);
else
--
2.20.1- [hackers] [st][PATCH 00/24] odg patches - fix warnings/... Oliver Galvin
- [hackers] [st][PATCH 01/24] add gitignore Oliver Galvin
- [hackers] [st][PATCH 06/24] fix warnings from -Wim... Oliver Galvin
- [hackers] [st][PATCH 07/24] fix warning from -Wmay... Oliver Galvin
- [hackers] [st][PATCH 02/24] avoid unnecessarily ch... Oliver Galvin
- [hackers] [st][PATCH 03/24] Reduce variable scope ... Oliver Galvin
- Re: [hackers] [st][PATCH 03/24] Reduce variabl... David Phillips
- [hackers] [st][PATCH 22/24] fix memory leak - dest... Oliver Galvin
- [hackers] [st][PATCH 19/24] improve type and const... Oliver Galvin
- [hackers] [st][PATCH 21/24] avoid unnecessarily li... Oliver Galvin
- Re: [hackers] [st][PATCH 21/24] avoid unnecess... Stephen Gregoratto
- [hackers] [st][PATCH 14/24] now st can build witho... Oliver Galvin
- Re: [hackers] [st][PATCH 14/24] now st can bui... Quentin Rameau
- [hackers] [st][PATCH 05/24] avoid warnings from -W... Oliver Galvin
- [hackers] [st][PATCH 10/24] fix -Wshadow warnings,... Oliver Galvin
