From 633f138b6bd1943adff4e028f788be4b4434153f Mon Sep 17 00:00:00 2001 From: Ludovic 'Archivist' Lagouardette Date: Mon, 4 Oct 2021 16:53:18 +0200 Subject: [PATCH] Remove the null terminator of string buffers This applies in both constexpr buffers and non constexpr contexts, this was detected because Elixir would consider logs as binaries --- include/gp/containers/buffer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gp/containers/buffer.hpp b/include/gp/containers/buffer.hpp index 07a9823..3678429 100644 --- a/include/gp/containers/buffer.hpp +++ b/include/gp/containers/buffer.hpp @@ -22,7 +22,7 @@ namespace gp{ static constexpr size_t local_strlen(const char* str) { auto ptr = str; do{}while(*(ptr++)); - return ptr-str; + return ptr-str-1; } public: