Don't clobber data, just adjust url endpoint

This commit is contained in:
RichardHitt 2013-03-31 12:14:52 -07:00
parent 503968c1fd
commit 3fee94473b

View File

@ -289,7 +289,7 @@ url_check_line (char *buf, int len)
g_match_info_fetch_pos(gmi, 0, &start, &end); g_match_info_fetch_pos(gmi, 0, &start, &end);
while (end > start && (po[end - 1] == '\r' || po[end - 1] == '\n')) while (end > start && (po[end - 1] == '\r' || po[end - 1] == '\n'))
po[--end] = 0; end--;
if (g_strstr_len (po + start, end - start, "://")) if (g_strstr_len (po + start, end - start, "://"))
url_add(po + start, end - start); url_add(po + start, end - start);
g_match_info_next(gmi, NULL); g_match_info_next(gmi, NULL);