瀏覽代碼

dialog(k): When restoring dialog variables from database, stop iterating
through given dialog hash table bucket once matching dialog is found.

- Fixes FS #171.
- Credits to Daniel-Constantin Mierla.

Timo Reimann 14 年之前
父節點
當前提交
34fc972291
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules_k/dialog/dlg_db_handler.c

+ 1 - 1
modules_k/dialog/dlg_db_handler.c

@@ -527,7 +527,7 @@ static int load_dialog_vars_from_db(int fetch_num_rows)
 				while (dlg) {
 				while (dlg) {
 					if (dlg->h_id == VAL_INT(values+1)) {
 					if (dlg->h_id == VAL_INT(values+1)) {
 						set_dlg_variable_unsafe(dlg, &VAL_STR(values+2), &VAL_STR(values+3));
 						set_dlg_variable_unsafe(dlg, &VAL_STR(values+2), &VAL_STR(values+3));
-						continue;
+						break;
 					}
 					}
 					dlg = dlg->next;
 					dlg = dlg->next;
 					if (!dlg) {
 					if (!dlg) {