From c3c14663ae70bfc5aa3cec3e3ac9d2d14b452a78 Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Wed, 12 Apr 2017 10:08:00 -0700 Subject: [PATCH] msvcp90: Update exception RTTI data to reflect it's part of std namespace so that exceptions thrown from inside of Wine can be caught in Windows frames Wine's string::substr -> _Xran -> _Xout_of_range isn't caught in this situation: try { ... start = value.find_first_not_of(...) // string::npos ... value.substr(start, ...) ... } catch (std::exception e) // catch block skipped { } Similar to 1be46548421aab77c7a9262081459ddc28fe5a3b Signed-off-by: Daniel Lehman --- dlls/msvcp90/exception.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp90/exception.c b/dlls/msvcp90/exception.c index d323ded..7712de7 100644 --- a/dlls/msvcp90/exception.c +++ b/dlls/msvcp90/exception.c @@ -206,7 +206,7 @@ const char* __thiscall MSVCP_exception_what(exception * this) return this->name ? this->name : "Unknown exception"; } -#ifdef _MSVCIRT +#if defined(_MSVCIRT) || (_MSVCP_VER >= 80) DEFINE_RTTI_DATA0(exception, 0, ".?AVexception@std@@") #else DEFINE_RTTI_DATA0(exception, 0, ".?AVexception@@") @@ -409,7 +409,7 @@ const char* __thiscall MSVCP_logic_error_what(logic_error *this) #endif } -#ifdef _MSVCIRT +#if defined(_MSVCIRT) || (_MSVCP_VER >= 80) DEFINE_RTTI_DATA1(logic_error, 0, &exception_rtti_base_descriptor, ".?AVlogic_error@std@@") #else DEFINE_RTTI_DATA1(logic_error, 0, &exception_rtti_base_descriptor, ".?AVlogic_error@@") -- 1.9.5