From 8ce0a584d3d081bba02d99f16465b670e9805cf7 Mon Sep 17 00:00:00 2001 From: matyalatte Date: Fri, 6 Sep 2024 22:07:56 +0900 Subject: [PATCH] fix a compile error on Ubuntu20.04 with an old version of GCC --- src/string_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/string_utils.cpp b/src/string_utils.cpp index 43a477d..20812bc 100644 --- a/src/string_utils.cpp +++ b/src/string_utils.cpp @@ -161,7 +161,7 @@ STR StrSplitLast(const STR& str) { while (!IS_SPACE(*str_p) && str_p >= start) str_p--; - return STR(str_p + 1, end); + return STR(str_p + 1, TO_SIZE(end - str_p - 1)); } template std::string StrSplitLast(const std::string& str); template std::string_view StrSplitLast(const std::string_view& str);