From 13a19c7877c9a7dce81ec273cea780b86aa6e595 Mon Sep 17 00:00:00 2001 From: zawz Date: Sun, 16 Jun 2019 00:13:18 +0200 Subject: [PATCH] Fixed 'channel' tag being mandatory --- src/device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.cpp b/src/device.cpp index ec9d01c..130cd93 100644 --- a/src/device.cpp +++ b/src/device.cpp @@ -61,7 +61,7 @@ bool Device::import_chunk(Chunk const& ch) id=stoi(tch["id"].strval()); //channel - if(tch["channel"].strval()=="*") + if(tch.subChunkPtr("channel") == nullptr || tch["channel"].strval()=="*") channel=-1; else channel=stoi(tch["channel"].strval());