From 72edd42d693a8bc2a922c963df1aefc8b8918a8a Mon Sep 17 00:00:00 2001 From: NBruderman Date: Mon, 8 Jun 2015 15:54:55 +0300 Subject: [PATCH] libril: Fix element count This lines should drop every 5th element (#5,#10,#15,...). At the moment it is dropping elements #6, #11, #16, as it start from 0 and the list start from 1. So let's match it up. Thanks to Tobias Heinemann for the idea. Change-Id: Idc2904040119716e666ea0fe320cde1d45869ee5 --- ril/libril/ril.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ril/libril/ril.cpp b/ril/libril/ril.cpp index 5b600fde..e56e6f41 100644 --- a/ril/libril/ril.cpp +++ b/ril/libril/ril.cpp @@ -2305,7 +2305,7 @@ static int responseStrings(Parcel &p, void *response, size_t responselen, bool n /* each string*/ startResponse; for (int i = 0 ; i < numStrings ; i++) { - if (network_search && (i % 5 == 0)) + if (network_search && ((i + 1) % 5 == 0)) continue; appendPrintBuf("%s%s,", printBuf, (char*)p_cur[i]); writeStringToParcel (p, p_cur[i]);