diff --git a/pykd_ext/version.h b/pykd_ext/version.h index 1139188..d026650 100644 --- a/pykd_ext/version.h +++ b/pykd_ext/version.h @@ -3,7 +3,7 @@ #define PYKDEXT_VERSION_MAJOR 2 #define PYKDEXT_VERSION_MINOR 0 #define PYKDEXT_VERSION_SUBVERSION 0 -#define PYKDEXT_VERSION_BUILDNO 10 +#define PYKDEXT_VERSION_BUILDNO 11 #define __VER_STR2__(x) #x #define __VER_STR1__(x) __VER_STR2__(x) diff --git a/pykd_ext/windbgext.cpp b/pykd_ext/windbgext.cpp index d75a285..3308262 100644 --- a/pykd_ext/windbgext.cpp +++ b/pykd_ext/windbgext.cpp @@ -387,18 +387,19 @@ py( if (IsPy3()) { - // устанавиливаем питоновские аргументы - std::vector pythonArgs(opts.args.size()); - std::wstring scriptFileNameW = _bstr_t(scriptFileName.c_str()); - pythonArgs[0] = const_cast(scriptFileNameW.c_str()); + // устанавиливаем питоновские аргументы + std::vector argws(opts.args.size()); + + argws[0] = scriptFileNameW; for (size_t i = 1; i < opts.args.size(); ++i) - { - std::wstring argw = _bstr_t(opts.args[i].c_str()); - pythonArgs[i] = const_cast(argw.c_str()); - } + argws[i] = _bstr_t(opts.args[i].c_str()); + + std::vector pythonArgs(opts.args.size()); + for (size_t i = 0; i < opts.args.size(); ++i) + pythonArgs[i] = const_cast(argws[i].c_str()); PySys_SetArgv_Py3((int)opts.args.size(), &pythonArgs[0]);