From 4710021393d0a11c2cace004be49d3057f6269e7 Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 30 Aug 2018 01:07:19 +0200 Subject: [PATCH] Bugfix: Did not count characters in content warnings, resulted in lost messages. fixes #1 --- CMakeLists.txt | 2 +- src/parse.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d1dc928..a0026af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.6) project (mastorss - VERSION 0.7.4 + VERSION 0.7.5 LANGUAGES CXX ) diff --git a/src/parse.cpp b/src/parse.cpp index c9b5eac..aec953c 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -164,7 +164,7 @@ std::vector parse_website(const string &xml) content = std::regex_replace(content, std::regex("##"), "#"); uint16_t appendix_size = config[profile]["append"].asString().length(); - if ((content.size() + link.size() + appendix_size) + if ((status.spoiler_text().size() + content.size() + link.size() + appendix_size) > static_cast(max_size - 4)) { content.resize((max_size - link.size() - appendix_size - 4));