Skip to content

Commit

Permalink
Advance past a space, in case the JSON has one after the colon.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsimantov committed Jan 24, 2024
1 parent 62fd7aa commit 97a72bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions testing/test_framework/src/firebase_test_framework.cc
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ int64_t FirebaseTest::GetCurrentTimeInSecondsSinceEpoch() {
return (app_framework::GetCurrentTimeInMicroseconds() / 1000000L);
}
begin += strlen(kJsonTag);
if (response_body[begin] == ' ') {
// Advance past a single space, if present.
begin++;
}

size_t end = response_body.find(",", begin);
if (end < 0) end = response_body.find("}", begin);
Expand Down

0 comments on commit 97a72bd

Please sign in to comment.