Skip to content

Commit d21ee8f

Browse files
committed
Correcting pointer bug
Original code failed to compile on platforms with tighter compiler restrictions (ie Artemis, Teensy, etc). This fixes the error and fixes a potential bug as well.
1 parent 21f58e4 commit d21ee8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SparkFun_LTE_Shield_Arduino_Library.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ LTE_Shield_error_t LTE_Shield::getAPN(String *apn, IPAddress *ip)
741741
{
742742
// Fill in the APN:
743743
searchPtr = strchr(searchPtr, '\"'); // Move to first quote
744-
while ((*(++searchPtr) != '\"') && (searchPtr != '\0'))
744+
while ((*(++searchPtr) != '\"') && (*searchPtr != '\0'))
745745
{
746746
apn->concat(*(searchPtr));
747747
}
@@ -952,7 +952,7 @@ LTE_Shield_error_t LTE_Shield::getOperator(String *oper)
952952
}
953953
else
954954
{
955-
while ((*(++searchPtr) != '\"') && (searchPtr != '\0'))
955+
while ((*(++searchPtr) != '\"') && (*searchPtr != '\0'))
956956
{
957957
oper->concat(*(searchPtr));
958958
}

0 commit comments

Comments
 (0)