You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If page_num start from 0 to TABLE_MAX_PAGE - 1, not 1, the if statement should be this instead. Tell me if I am right or wrong.
void*get_page(Pager*pager, uint32_tpage_number){
if(page_number >= TABLE_MAX_PAGES){
printf("Tried to fetch page number out of bounds. %d > %d\n", page_number, TABLE_MAX_PAGES);
exit(EXIT_FAILURE);
}
The text was updated successfully, but these errors were encountered:
(line 248 in db.c)if (page_num <= num_pages) I think it should be if (page_num < num_pages). Since the page_num is an index starts from 0 to TABLE_MAX_PAGE - 1, and the num_pages starts from 1.
I'm not quite sure. Could you please tell me if I am right or wrong? Thanks so much.
If page_num start from 0 to TABLE_MAX_PAGE - 1, not 1, the if statement should be this instead. Tell me if I am right or wrong.
The text was updated successfully, but these errors were encountered: