Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/section_list_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int load_section_config_from_db(int update_gen_ex)
p_section->enable = (int8_t)atoi(row[6]);

// Update gen_ex menu set
if (update_gen_ex && p_section->enable && atoi(row[7]) > p_section->ex_menu_tm)
if (update_gen_ex && p_section->enable && atol(row[7] == NULL ? "0" : row[7]) > p_section->ex_menu_tm)
{
snprintf(ex_menu_conf, sizeof(ex_menu_conf), "%s/%d", VAR_GEN_EX_MENU_DIR, p_section->sid);

Expand All @@ -177,6 +177,10 @@ int load_section_config_from_db(int update_gen_ex)
#endif
}
}
else
{
p_section->ex_menu_tm = 0;
}

// release rw lock
ret = section_list_rw_unlock(p_section);
Expand Down