Follows is the proper form of the st patch submitted earlier,
st-fix_8613_colors-0.8.1.diff:

diff -up st-0.8.1/st.c st-0.8.1-changed/st.c
--- st-0.8.1/st.c       Tue Mar 20 15:29:59 2018
+++ st-0.8.1-changed/st.c       Wed Jul 25 13:55:16 2018
@@ -1157,7 +1157,7 @@ csiparse(void)
                        v = -1;
                csiescseq.arg[csiescseq.narg++] = v;
                p = np;
-               if (*p != ';' || csiescseq.narg == ESC_ARG_SIZ)
+               if (*p != ';' || *p != ':' || csiescseq.narg == ESC_ARG_SIZ)
                        break;
                p++;
        }
@@ -1311,16 +1311,16 @@ tdefcolor(int *attr, int *npar, int l)

        switch (attr[*npar + 1]) {
        case 2: /* direct color in RGB space */
-               if (*npar + 4 >= l) {
+               if (*npar + 5 >= l) {
                        fprintf(stderr,
                                "erresc(38): Incorrect number of parameters 
(%d)\n",
                                *npar);
                        break;
                }
-               r = attr[*npar + 2];
-               g = attr[*npar + 3];
-               b = attr[*npar + 4];
-               *npar += 4;
+               r = attr[*npar + 3];
+               g = attr[*npar + 4];
+               b = attr[*npar + 5];
+               *npar += 5;
                if (!BETWEEN(r, 0, 255) || !BETWEEN(g, 0, 255) || !BETWEEN(b, 
0, 255))
                        fprintf(stderr, "erresc: bad rgb color (%u,%u,%u)\n",
                                r, g, b);

Reply via email to