mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 21:23:01 +01:00
Fix off by one error and comment magic numbers
This commit is contained in:
parent
2ff9d29491
commit
eb964b64c2
@ -374,33 +374,33 @@ int line_info_add(ToxWindow *self, bool show_timestamp, const char *name1, const
|
|||||||
|
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case OUT_ACTION:
|
case OUT_ACTION:
|
||||||
len += strlen(user_settings->line_normal) + 2;
|
len += strlen(user_settings->line_normal) + 2; // two spaces
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IN_MSG:
|
case IN_MSG:
|
||||||
|
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case OUT_MSG:
|
case OUT_MSG:
|
||||||
len += strlen(user_settings->line_normal) + 3;
|
len += strlen(user_settings->line_normal) + 3; // two spaces and a ':' char
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CONNECTION:
|
case CONNECTION:
|
||||||
len += strlen(user_settings->line_join) + 2;
|
len += strlen(user_settings->line_join) + 2; // two spaces
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISCONNECTION:
|
case DISCONNECTION:
|
||||||
len += strlen(user_settings->line_quit) + 2;
|
len += strlen(user_settings->line_quit) + 2; // two spaces
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SYS_MSG:
|
case SYS_MSG:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NAME_CHANGE:
|
case NAME_CHANGE:
|
||||||
len += strlen(user_settings->line_alert) + 1;
|
len += strlen(user_settings->line_alert) + 2; // two spaces
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROMPT:
|
case PROMPT:
|
||||||
len += 2;
|
len += 2; // '$' char and a space
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user