$ git diff
diff --git a/src/cal.c b/src/cal.c
index 769d803..d296767 100644
--- a/src/cal.c
+++ b/src/cal.c
@@ -1224,6 +1224,7 @@ void ansiputs(char *l, char *a)
void setcolor(char attr)
{
char command[256];
+ char printbuf[256];
char dos2ansi[] = { 0, 4, 2, 6, 1, 5, 3, 7, 0, 4, 2, 6, 1, 5, 3, 7};
if (!crt) return;
@@ -1239,9 +1240,9 @@ void setcolor(char attr)
strcpy(command,"\033[0;");
if (attr&0x80) strcat(command,"5;");
if (attr&0x08) strcat(command,"1;");
- sprintf(command,"%s3%d;4%dm",command,dos2ansi[attr&0x0F],
+ sprintf(printbuf,"%s3%d;4%dm",command,dos2ansi[attr&0x0F],
dos2ansi[(attr&0x70)>>4]);
- fputs(command,stdout);
+ fputs(printbuf,stdout);
}
}
#endif /* USE_ANSI */
fixes the issue in a yucky way.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2097279
Title:
ccal does not display properly
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cal/+bug/2097279/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs