Skip to content

Commit a1b2738

Browse files
committed
dialog: Do not crash with previous table version (11)
This patch ensures OpenSIPS doesn't crash if the "dialog.script_flags" column is still of INT type (previous DB schema, before OpenSIPS 3.4).
1 parent c13d725 commit a1b2738

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/dialog/dlg_db_handler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ static int load_dialog_info_from_db(int dlg_hash_size)
722722
}
723723

724724
/* script flags */
725-
if (!VAL_NULL(values+19)) {
725+
if (!VAL_NULL(values+19) && VAL_TYPE(values+19) != DB_INT) {
726726
GET_STR_VALUE(flag_list, values, 19, 0, 0);
727727
dlg->user_flags = flag_list_to_bitmask(&flag_list,
728728
FLAG_TYPE_DIALOG, FLAG_DELIM, 1);

0 commit comments

Comments
 (0)