From a34ffda422dfbc0f221502f7bf2dddc26c715a76 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Mon, 4 Jul 2022 21:12:39 +0200 Subject: [PATCH] Osmo-CC: Fixed routing in screen tables --- src/libosmocc/screen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libosmocc/screen.c b/src/libosmocc/screen.c index 6c5463b..5558f42 100644 --- a/src/libosmocc/screen.c +++ b/src/libosmocc/screen.c @@ -512,7 +512,8 @@ static int osmo_cc_screen(const char *what, osmo_cc_screen_list_t *list, uint8_t continue; /* '@' means to stop and return routing also */ } else if (list->to[i] == SCREEN_AT) { - *routing_p = &list->to[i + 1]; + if (routing_p) + *routing_p = &list->to[i + 1]; break; } /* copy output digit */ @@ -549,7 +550,7 @@ static int osmo_cc_screen(const char *what, osmo_cc_screen_list_t *list, uint8_t PDEBUG(DCC, DEBUG_INFO, " -> present = restricted\n"); break; } - if (*routing_p && **routing_p) + if (routing_p && *routing_p) PDEBUG(DCC, DEBUG_INFO, " -> remote = %s\n", *routing_p); return 0;