Fixed 'channel' tag being mandatory

This commit is contained in:
zawz 2019-06-16 00:13:18 +02:00
parent 49f8bc7185
commit 13a19c7877

View file

@ -61,7 +61,7 @@ bool Device::import_chunk(Chunk const& ch)
id=stoi(tch["id"].strval()); id=stoi(tch["id"].strval());
//channel //channel
if(tch["channel"].strval()=="*") if(tch.subChunkPtr("channel") == nullptr || tch["channel"].strval()=="*")
channel=-1; channel=-1;
else else
channel=stoi(tch["channel"].strval()); channel=stoi(tch["channel"].strval());