Fix off-by-one error
bt::string takes the full length of the buffer including the terminating null-char
This commit is contained in:
parent
e55390338a
commit
c993f8a38e
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue