From 0b387a24678bde035d57fe34c5cdf3cd924eab74 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Mon, 13 Jan 2014 11:54:08 +0100 Subject: [PATCH] [Companion] Assert on EEPROM import errors removed --- companion/src/file.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/companion/src/file.cpp b/companion/src/file.cpp index 10c918cf3..404a40db8 100644 --- a/companion/src/file.cpp +++ b/companion/src/file.cpp @@ -323,7 +323,10 @@ unsigned int EFile::readRlc12(uint8_t *buf, unsigned int i_len, bool rlc2) if (read(&m_bRlc, 1) !=1) break; //read how many bytes to read - assert(m_bRlc & 0x7f); + if (!(m_bRlc & 0x7f)) { + qDebug() << "RLC decoding error!"; + return 0; + } if (rlc2) { if(m_bRlc&0x80){ // if contains high byte