aboutsummaryrefslogtreecommitdiff
path: root/messageWind.c
diff options
context:
space:
mode:
authorache <ache@ache.one>2019-09-13 00:37:33 +0200
committerache <ache@ache.one>2019-09-13 00:37:33 +0200
commit8b0aa8e2b552f57aaf8c6c9dfa164219aa85932d (patch)
tree8f94a84a42a2afd8ecdad76b773a759cad809f95 /messageWind.c
parentSearch in conv feature (diff)
Fix color message bug
Diffstat (limited to 'messageWind.c')
-rw-r--r--messageWind.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/messageWind.c b/messageWind.c
index 5b71b5e..2c788a5 100644
--- a/messageWind.c
+++ b/messageWind.c
@@ -69,7 +69,8 @@ int show1SMS(sms* S, int y_base, int* hasFinish) {
*hasFinish = 1;
- attrset( COLOR_PAIR( (rand()%8) + 2) | A_BOLD);
+ int nbColors = 7 - 1;
+ attrset( COLOR_PAIR( (rand() % nbColors) + 2) | A_BOLD);
while( S->text[iS] ) {
x = 0;
while( x < w_WMessageSMS-1 && S->text[iS]) {