Skip to content

Commit

Permalink
fix breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Apr 16, 2023
1 parent 46d8f1f commit 39e6e1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gplaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,8 @@ static SelectorList download_text(Selector *sel, int ask, int handle, int print)
if (parsed > 0 || length < sizeof(buffer)) break; /* if we still don't have the end of the line, receive more */
end = &buffer[sizeof(buffer) - 1]; /* if the buffer is full and we haven't found a \n, terminate the line */
}
if (end > start && end[-1] == '\r') --end;
*end = '\0';
if (end > start && end[-1] == '\r') end[-1] = '\0';
else *end = '\0';
if (plain || !interactive) parse_plaintext_line((parsed == 0 && strncmp(start, "\xef\xbb\xbf", 3) == 0) ? start + 3: start, &pre, &it, &list);
else parse_gemtext_line((parsed == 0 && strncmp(start, "\xef\xbb\xbf", 3) == 0) ? start + 3: start, &pre, &it, &list);
if (print && it) print_gemtext_line(stdout, it, NULL, width, &links);
Expand Down

0 comments on commit 39e6e1e

Please sign in to comment.