aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-04-24 15:49:57 -0400
committerB. Watson <urchlay@slackware.uk>2026-04-24 15:49:57 -0400
commita50e1e52fd7c62fda2d1804a3c7a860e47bf74a4 (patch)
tree48b574c2bd6c299b9e69b2ce6abbc08158b3295f /src/main.c
parent715964c0b5ab8a2bc2b8ae8b7935e9ea0088e332 (diff)
downloadfujinet-chat-a50e1e52fd7c62fda2d1804a3c7a860e47bf74a4.tar.gz
init_channels() has to call scr_create(), fixes the garbage issue.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 1ed7240..5bf2db5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -82,10 +82,11 @@ void fn_disconnect(void) {
void init_channels(void) {
char i;
- for(i = 0; i < MAX_SCREENS - 2; i++) {
+ /* TODO: handle up to MAX_SCREENS when config.channels grows
+ past 5 elements. */
+ for(i = 0; /* i < MAX_SCREENS - 2 */ i < 6; i++) {
if(config.channels[i][0]) {
- screens[i + 2].status = SCR_INACTIVE;
- strcpy(screens[i + 2].title, config.channels[i]);
+ scr_create(config.channels[i]);
}
}
}