Skip to content

Commit 15e1c76

Browse files
committed
Not finding the JSON beginning is not okay
1 parent ecee47a commit 15e1c76

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

DBAPI.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,9 @@ DBdeparr* DBAPI::getStationBoard(
215215
return deparr;
216216
}
217217
JsonDocument doc;
218-
client.find(":["); // Skip to first element
218+
if (!client.find(":[")) { // Skip to first element
219+
return deparr;
220+
}
219221
do {
220222
DeserializationError error = deserializeJson(doc, client);
221223
if (error) {

0 commit comments

Comments
 (0)