Skip to content

Commit

Permalink
Fix: offset pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
badcast committed Nov 18, 2023
1 parent 9885839 commit c2073a6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/net/tea_net_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,16 @@ int net_send(const char *url, const char *body, size_t len, struct net_responce_

if(net_result == CURLE_OK)
{
for(int x = 0; x < receiver->size; ++x)
const char * p = receiver->raw_data;
const char * pe = p + receiver->size;
for(;p<=pe;)
{
if(receiver->raw_data[x] == '{')
if(*p == '{')
{
receiver->json_data = receiver->raw_data + x;
receiver->json_data = p;
break;
}
++p;
}
}
else
Expand Down

0 comments on commit c2073a6

Please sign in to comment.