diff --git a/dist/treebird40.css b/dist/treebird40.css index 8055378..ae362cf 100644 --- a/dist/treebird40.css +++ b/dist/treebird40.css @@ -51,6 +51,7 @@ ul #main-page { + background-color: #fff; width: 1000px; margin-left: auto; margin-right: auto; diff --git a/src/navigation.c b/src/navigation.c index dd107e7..b518c35 100644 --- a/src/navigation.c +++ b/src/navigation.c @@ -31,7 +31,8 @@ char* construct_navigation_box(char* start_id, size_t* size) { char* nav_html; - int is_start = strcmp(start_id, prev_id) == 0; + + int is_start = start_id && prev_id ? strcmp(start_id, prev_id) == 0 : 0; size_t s = easprintf(&nav_html, data_navigation_html, start_id, diff --git a/src/timeline.c b/src/timeline.c index 2900bee..35cfb02 100644 --- a/src/timeline.c +++ b/src/timeline.c @@ -33,7 +33,7 @@ void tl_public(struct session* ssn, mastodont_t* api, int local) { - size_t status_count, statuses_html_count; + size_t status_count = 0, statuses_html_count = 0; struct mstdnt_status* statuses = NULL; struct mstdnt_storage storage = { 0 }; char* status_format = NULL, @@ -62,7 +62,7 @@ void tl_public(struct session* ssn, mastodont_t* api, int local) // Construct statuses into HTML status_format = construct_statuses(api, statuses, status_count, &statuses_html_count); if (!status_format) - status_format = "Error in malloc!"; + status_format = construct_error("Couldn't load posts", E_ERROR, 1, NULL); } // Create post box