--- a/gameServer2/src/protocol/parser.rs Wed Jul 04 12:57:05 2018 +0300
+++ b/gameServer2/src/protocol/parser.rs Wed Jul 04 13:56:49 2018 +0300
@@ -173,10 +173,9 @@
value: opt_param >>
(GameCfg::Ammo(name, value)))
| do_parse!(tag!("SCHEME") >> eol >>
- name: a_line >> eol >>
- values: separated_list!(eol, a_line) >>
- (GameCfg::Scheme(name,
- if values.is_empty() {None} else {Some(values)})))
+ name: a_line >>
+ values: opt!(preceded!(eol, separated_list!(eol, a_line))) >>
+ (GameCfg::Scheme(name, values)))
| do_parse!(tag!("FEATURE_SIZE") >> eol >>
value: u32_line >>
(GameCfg::FeatureSize(value)))