Auto merge of #55 - matthiasbeyer:fix-warn_header_data_malformed, r=matthiasbeyer

Fix: [warn]: Malformed Header, expected Array

We did not check whether we got the TAGS array in here.
This commit is contained in:
Homu 2016-01-04 04:38:49 +09:00
commit 5dbf82eb29
1 changed files with 5 additions and 1 deletions

View File

@ -87,7 +87,11 @@ pub mod data {
let keys : Vec<FHD> = ks.clone();
for key in keys {
match key {
FHD::Key{name: _, value: ref v} => return match_array(v),
FHD::Key{name: ref name, value: ref v} => {
if name == "TAGS" {
return match_array(v)
}
},
_ => warn!("Malformed Header Data: Expected Key, found non-Key"),
}
}