From efce1eb17192f46bf01e77f244c76add3061f8f6 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 27 Jul 2015 20:35:29 +0200 Subject: Fix segmentation fault in short label check --- src/MuxElements.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp index e8871d1..ac6ee32 100644 --- a/src/MuxElements.cpp +++ b/src/MuxElements.cpp @@ -104,10 +104,10 @@ int DabLabel::setShortLabel(const std::string& slabel) /* Iterate over the label and set the bits in the flag * according to the characters in the slabel */ - for (int i = 0; i < 32; ++i) { + for (int i = 0; i < 16; ++i) { if (*slab == this->m_text[i]) { flag |= 0x8000 >> i; - if (*(++slab) == 0) { + if (*(++slab) == '\0') { break; } } -- cgit v1.2.3