diff options
author | NBruderman <nbruderman@gmail.com> | 2015-06-08 15:54:55 +0300 |
---|---|---|
committer | Nir Bruderman <nbruderman@gmail.com> | 2015-06-08 12:57:53 +0000 |
commit | 72edd42d693a8bc2a922c963df1aefc8b8918a8a (patch) | |
tree | ec280fb8e2aaeb914142a57a7a8420188e06e173 | |
parent | f7a63e5be906f61073c2b142d5e927fd40aadb13 (diff) | |
download | android_hardware_samsung-72edd42d693a8bc2a922c963df1aefc8b8918a8a.tar.gz android_hardware_samsung-72edd42d693a8bc2a922c963df1aefc8b8918a8a.tar.bz2 android_hardware_samsung-72edd42d693a8bc2a922c963df1aefc8b8918a8a.zip |
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
-rw-r--r-- | ril/libril/ril.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ril/libril/ril.cpp b/ril/libril/ril.cpp index 5b600fd..e56e6f4 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]); |