commit ebd2944c2e90ba5e5fb358a407e5a8fc3de495a5
parent de4325895bd5b7721e5538ec51fc6c3381bb69c2
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Wed, 23 Feb 2022 23:16:29 +0100
fix another comment removal issue, thx to @MulB, fixes #66
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/jucePlugin/VirusParameterDescriptions.cpp b/source/jucePlugin/VirusParameterDescriptions.cpp
@@ -15,7 +15,7 @@ namespace Virus
std::string removeComments(std::string _json)
{
- auto removeBlock = [&](const char* _begin, const char* _end)
+ auto removeBlock = [&](const std::string& _begin, const std::string& _end)
{
const auto pos = _json.find(_begin);
@@ -25,7 +25,7 @@ namespace Virus
const auto end = _json.find(_end, pos + 1);
if (end != std::string::npos)
- _json.erase(pos, end - pos + 1);
+ _json.erase(pos, end - pos + _end.size());
else
_json.erase(pos);