Fix off-by-one error

bt::string takes the full length of the buffer including
the terminating null-char
This commit is contained in:
King_DuckZ 2022-05-19 15:01:36 +02:00
parent 7770d67392
commit c6d01f745a

View file

@ -61,7 +61,7 @@ namespace wren {
constexpr auto from = last_whatever + (last_whatever == fname_len ? 0 : 1); constexpr auto from = last_whatever + (last_whatever == fname_len ? 0 : 1);
constexpr auto len = detail::find_token_end(fname + from, fname_len - from); constexpr auto len = detail::find_token_end(fname + from, fname_len - from);
constexpr dhandy::bt::string<len> retval{fname + from, 0}; constexpr dhandy::bt::string<len+1> retval{fname + from, 0};
return retval; return retval;
//#elif defined(_MSC_VER) //#elif defined(_MSC_VER)
//void __cdecl guess_class_name<class MyTest>(void) //void __cdecl guess_class_name<class MyTest>(void)