blob: 9e4a441db66cef70e0c99f8db17f8cd510774d96 (
plain)
#######################################################################
# Fix index listings with only LF and no CRs.
# dave@slackbuilds.org
#######################################################################
diff -Naur '--exclude=.git' bb/src/protocol/gopher/gopher.c cc/src/protocol/gopher/gopher.c
--- bb/src/protocol/gopher/gopher.c 2020-01-14 06:42:11.030536586 +0000
+++ cc/src/protocol/gopher/gopher.c 2020-01-14 06:42:26.710000886 +0000
@@ -757,6 +757,11 @@
switch (gopher->entity->type) {
case GOPHER_DIRECTORY:
case GOPHER_INDEX:
+ /* Lines with no carriage returns */
+ if (strchr(rb->data, ASCII_CR) == NULL) {
+ strncat(rb->data, "\r\n", 2);
+ rb->length += 3;
+ }
state = read_gopher_directory_data(conn, rb);
break;
|