From f0975d948c79ab12150a1cbbdc3bb7be664452f6 Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Thu, 12 Oct 2017 16:38:33 -0700 Subject: [PATCH 2/4] msvcp90: Call exception ctor in logic_error and runtime_error ctor. this->e.name isn't set to given message, so what() returns 'Unknown exception' also, calling MSVCP_exception_ctor mirrors what is done in MSVCP_logic_error_dtor and MSVCP_runtime_error_dtor, which always call MSVCP_exception_dtor Signed-off-by: Daniel Lehman --- dlls/msvcp90/exception.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dlls/msvcp90/exception.c b/dlls/msvcp90/exception.c index e62dfae..3dbc518 100644 --- a/dlls/msvcp90/exception.c +++ b/dlls/msvcp90/exception.c @@ -308,11 +308,8 @@ DEFINE_THISCALL_WRAPPER(MSVCP_logic_error_ctor, 8) logic_error* __thiscall MSVCP_logic_error_ctor( logic_error *this, exception_name name ) { TRACE("%p %s\n", this, EXCEPTION_STR(name)); -#ifdef _MSVCIRT MSVCP_exception_ctor(&this->e, name); -#else - this->e.name = NULL; - this->e.do_free = FALSE; +#ifndef _MSVCIRT MSVCP_basic_string_char_ctor_cstr(&this->str, EXCEPTION_STR(name)); #endif this->e.vtable = &MSVCP_logic_error_vtable; @@ -549,11 +546,8 @@ typedef struct { static runtime_error* MSVCP_runtime_error_ctor( runtime_error *this, exception_name name ) { TRACE("%p %s\n", this, EXCEPTION_STR(name)); -#ifdef _MSVCIRT MSVCP_exception_ctor(&this->e, name); -#else - this->e.name = NULL; - this->e.do_free = FALSE; +#ifndef _MSVCIRT MSVCP_basic_string_char_ctor_cstr(&this->str, EXCEPTION_STR(name)); #endif this->e.vtable = &MSVCP_runtime_error_vtable; -- 1.9.5