From d923ece38df175d8f3cccb187786a62bd07de0e3 Mon Sep 17 00:00:00 2001 From: Don HO Date: Mon, 16 Jan 2017 21:52:52 +0100 Subject: [PATCH] Fix an issue due to VS2015 compiling result (bug) --- PowerEditor/src/Parameters.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 22b6c814..16cb096d 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -1948,7 +1948,7 @@ bool NppParameters::getSessionFromXmlTree(TiXmlDocument *pSessionDoc, Session *p TiXmlElement *actView = sessionRoot->ToElement(); size_t index; - const TCHAR *str = actView->Attribute(TEXT("activeView"), (int *)&index); + const TCHAR *str = actView->Attribute(TEXT("activeView"), reinterpret_cast(&index)); if (str) { (*ptrSession)._activeView = index; @@ -1962,14 +1962,15 @@ bool NppParameters::getSessionFromXmlTree(TiXmlDocument *pSessionDoc, Session *p { if (viewRoots[k]) { + size_t index2; TiXmlElement *actIndex = viewRoots[k]->ToElement(); - str = actIndex->Attribute(TEXT("activeIndex"), (int *)&index); + str = actIndex->Attribute(TEXT("activeIndex"), reinterpret_cast(&index2)); if (str) { if (k == 0) - (*ptrSession)._activeMainIndex = index; + (*ptrSession)._activeMainIndex = index2; else // k == 1 - (*ptrSession)._activeSubIndex = index; + (*ptrSession)._activeSubIndex = index2; } for (TiXmlNode *childNode = viewRoots[k]->FirstChildElement(TEXT("File")); childNode ;