From 448d8cfa48ba3ddd3fac1aa7eb7ff423da27f673 Mon Sep 17 00:00:00 2001 From: Oliver Giles Date: Wed, 17 Apr 2019 09:26:45 +0300 Subject: [PATCH] log.h: null-terminate compile-time filename strings --- src/log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.h b/src/log.h index b35b812..25f0800 100644 --- a/src/log.h +++ b/src/log.h @@ -38,7 +38,7 @@ namespace _ { } template static constexpr decltype(auto) static_alloc_str_impl(const char* str, std::integer_sequence) { - return (struct {char buf[N];}) {str[I]...}; + return (struct {char buf[N+1];}) {str[I]..., 0}; } template static constexpr decltype(auto) static_alloc_str(const char* str) {