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
tirimbino
NBruderman 10 years ago committed by Nir Bruderman
parent f7a63e5be9
commit 72edd42d69
  1. 2
      ril/libril/ril.cpp

@ -2305,7 +2305,7 @@ static int responseStrings(Parcel &p, void *response, size_t responselen, bool n
/* each string*/ /* each string*/
startResponse; startResponse;
for (int i = 0 ; i < numStrings ; i++) { for (int i = 0 ; i < numStrings ; i++) {
if (network_search && (i % 5 == 0)) if (network_search && ((i + 1) % 5 == 0))
continue; continue;
appendPrintBuf("%s%s,", printBuf, (char*)p_cur[i]); appendPrintBuf("%s%s,", printBuf, (char*)p_cur[i]);
writeStringToParcel (p, p_cur[i]); writeStringToParcel (p, p_cur[i]);

Loading…
Cancel
Save