From 4041bdc236c0cc353fddb36ba72c2db6611b728c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 28 Feb 2025 01:23:08 -0500 Subject: [PATCH] Bugfix color escape sequence --- conway.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conway.c b/conway.c index f029ade..594f357 100644 --- a/conway.c +++ b/conway.c @@ -88,11 +88,11 @@ int main(int argc, char **argv) { if (i + 1 >= argc) goto usage; int r,g,b; if (gethexrgb(argv[++i], &r, &g, &b) != 3) goto usage; - sprintf(alive_color, "\033[48;2;%d;%d;%d;m", r,g,b); + sprintf(alive_color, "\033[48;2;%d;%d;%dm", r,g,b); } else if (strcmp(argv[i], "-D") == 0) { int r,g,b; if (gethexrgb(argv[++i], &r, &g, &b) != 3) goto usage; - sprintf(dead_color, "\033[48;2;%d;%d;%d;m", r,g,b); + sprintf(dead_color, "\033[48;2;%d;%d;%dm", r,g,b); } else { goto usage; }