From 89263ec94135dfa03fe1e4501c780d982ee78385 Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Fri, 12 Jun 2020 11:48:28 +0200 Subject: Fixes #7: Wrong end-of-document detection. --- src/about/updates.gemini | 4 +++- src/gopherclient.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/about/updates.gemini b/src/about/updates.gemini index 1e65272..416cfee 100644 --- a/src/about/updates.gemini +++ b/src/about/updates.gemini @@ -4,6 +4,8 @@ * Adds support for transient client certificates * Adds support for permanent client certificates * Added this changelog to the software itself +* Fixed bug: Status bar label now does elide links that are too long instead of resizing the window. +* Fixed bug: Gopher end-of-file marker is now better detected. ## 0.2 * Implement Ctrl+D/*Add to favourites* menu item @@ -35,4 +37,4 @@ * Improved image pan and zooming. Explore those graphics! ## 0.1 -* Initial release \ No newline at end of file +* Initial release diff --git a/src/gopherclient.cpp b/src/gopherclient.cpp index 2c2cdf5..74359c6 100644 --- a/src/gopherclient.cpp +++ b/src/gopherclient.cpp @@ -69,8 +69,8 @@ void GopherClient::on_readRead() if(not is_processing_binary) { // Strip the "lone dot" from gopher data - if(int index = body.indexOf(".\r\n"); index >= 0) { - body.resize(index); + if(int index = body.indexOf("\r\n.\r\n"); index >= 0) { + body.resize(index + 2); socket.close(); } } -- cgit v1.2.3