Skip to content
Snippets Groups Projects
Commit a4dac113 authored by Jonathan Schöbel's avatar Jonathan Schöbel
Browse files

bugfix: wrong page id saved

The current page has to be returned, not the last one. This would lead
to permanently wrong page ids, so that later no page is accessible.
parent a11d65fe
No related branches found
No related tags found
No related merge requests found
......@@ -137,7 +137,9 @@ SH_Data_register_page (struct SH_Data * data, const char * name,
return PAGE_ERR;
}
data->pages[data->page_n].id = NEXT_PAGE(data->last_page);
NEXT_PAGE(data->last_page);
data->pages[data->page_n].id = data->last_page;
data->pages[data->page_n].name = strdup (name);
if (errno == ENOMEM)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment