mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-07 20:27:02 +01:00
19 lines
757 B
Diff
19 lines
757 B
Diff
#######################################################################
|
|
# 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;
|
|
|