From 0bef57e2d4a843c3c15d0a13d994880f5f836f27 Mon Sep 17 00:00:00 2001
From: Robert Schmidt <robert.schmidt@eurecom.fr>
Date: Thu, 19 Mar 2020 09:31:59 +0100
Subject: [PATCH] L2 sim: fix PDU_index test

---
 openair2/PHY_INTERFACE/phy_stub_UE.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair2/PHY_INTERFACE/phy_stub_UE.c b/openair2/PHY_INTERFACE/phy_stub_UE.c
index bf2bbf74295..4d3b579f845 100644
--- a/openair2/PHY_INTERFACE/phy_stub_UE.c
+++ b/openair2/PHY_INTERFACE/phy_stub_UE.c
@@ -740,7 +740,7 @@ int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req, module_id_t Mod_id) {
         continue;
       }
       const int pdu_index = dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index;
-      if (pdu_index < 0 && pdu_index >= tx_req_num_elems) {
+      if (pdu_index < 0 || pdu_index >= tx_req_num_elems) {
         LOG_E(MAC,
               "dl_config_req_UE_MAC 2: Problem with receiving data: "
               "sfn/sf:%d PDU[%d] size:%d, TX_PDU index: %d\n",
-- 
GitLab