mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[gopher] Nothing is easy as it seems. Refs #34
This commit is contained in:
parent
12b270e8d2
commit
e4b536f8ab
@ -567,7 +567,7 @@ add_gopher_menu_line(struct string *buffer, unsigned char *line)
|
||||
static unsigned char *
|
||||
get_gopher_line_end(unsigned char *data, int datalen)
|
||||
{
|
||||
for (; datalen > 1; data++, datalen--) {
|
||||
for (; datalen >= 1; data++, datalen--) {
|
||||
if (data[0] == ASCII_CR && data[1] == ASCII_LF)
|
||||
return data + 2;
|
||||
|
||||
@ -583,9 +583,6 @@ check_gopher_last_line(unsigned char *line, unsigned char *end)
|
||||
{
|
||||
assert(line < end);
|
||||
|
||||
/* Just to be safe NUL terminate the line */
|
||||
end[-2] = 0;
|
||||
|
||||
return line[0] == '.' && !line[1] ? NULL : line;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user