summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/network.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network.c b/src/network.c
index b84a7185..1a1d55ba 100644
--- a/src/network.c
+++ b/src/network.c
@@ -1422,11 +1422,11 @@ static void sim_csp_read_cb(int ok, int total_length, int record,
* manual selection is to be enabled. The latter is also the
* default.
*/
- while (i < record_length &&
+ while (i < total_length &&
data[i] != SIM_CSP_ENTRY_VALUE_ADDED_SERVICES)
i += 2;
- if (i == record_length)
+ if (i == total_length)
return;
if ((data[i + 1] & 0x80) != 0) {