How do I handle this exception in xstring?

1

I'm having an issue with my code in xstring. Basically when it tries to return __builtin_strlen(_First), I get thrown this exception: Unhandled exception at 0x0FFFC30E in csgo.exe: 0xC00001A5: An invalid exception handler routine has been detected (parameters: 0x00000003). Any help with this?

    _NODISCARD static _CONSTEXPR17 size_t length(_In_z_ const _Elem* const _First) noexcept { // strengthened
        // find length of null-terminated string
#if _HAS_CXX17
#if _HAS_CHAR8_T
        if constexpr (is_same_v<_Elem, char8_t>) {
#if _HAS_U8_INTRINSICS
            return __builtin_u8strlen(_First);
#else // ^^^ use u8 intrinsics / no u8 intrinsics vvv
            return _Char_traits<_Elem, _Int_type>::length(_First);
#endif // _HAS_U8_INTRINSICS
        } else
#endif // _HAS_CHAR8_T
        {
            return __builtin_strlen(_First); //EXCEPTION IS HERE
        }
#else // _HAS_CXX17
        return _CSTD strlen(reinterpret_cast<const char*>(_First));
#endif // _HAS_CXX17
    }
c++
exception
asked on Stack Overflow Dec 10, 2019 by verxztf • edited Dec 10, 2019 by verxztf

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0