提交 0d5fcf65 authored 作者: Mathieu Rene's avatar Mathieu Rene

xml_config: change min/max enforcements to >= instead of >

上级 29443648
...@@ -177,7 +177,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev ...@@ -177,7 +177,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev
if (int_options) { if (int_options) {
/* Enforce validation options */ /* Enforce validation options */
if ((int_options->enforce_min && !(intval > int_options->min)) || (int_options->enforce_max && !(intval < int_options->max))) { if ((int_options->enforce_min && !(intval >= int_options->min)) || (int_options->enforce_max && !(intval <= int_options->max))) {
/* Validation failed, set default */ /* Validation failed, set default */
intval = (int) (intptr_t) item->defaultvalue; intval = (int) (intptr_t) item->defaultvalue;
/* Then complain */ /* Then complain */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论