]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
en50221: fix menu text decoding
authorAnssi Hannula <anssi.hannula@iki.fi>
Sat, 11 May 2019 22:56:48 +0000 (01:56 +0300)
committerJaroslav Kysela <perex@perex.cz>
Mon, 20 May 2019 16:41:40 +0000 (18:41 +0200)
getmenutext() checks that dvb_get_string() returns greater than 0, but
that function returns 0 on success.

This causes menu text decoding to always fail, resulting in no menu
texts.

Fix the check to match dvb_get_string() behavior.

src/input/mpegts/en50221/en50221_apps.c

index e89d8fcf7d3969b53a4066a1450dfb72de318900..7509a03b7accdc770bf45f58efb0686d41095dce 100644 (file)
@@ -496,7 +496,7 @@ getmenutext
     return r;
   if (l2 > 0) {
     txt = alloca(l2 * 2 + 1);
-    if (dvb_get_string(txt, l2 * 2 + 1, p2, l2, NULL, NULL) > 0 && txt[0]) {
+    if (dvb_get_string(txt, l2 * 2 + 1, p2, l2, NULL, NULL) == 0 && txt[0]) {
       if (list) {
         c = htsmsg_get_list(app->cia_menu, key);
         if (c == NULL) {