diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 6f57b9d87..974b6d8ff 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -2213,13 +2213,10 @@ void Notepad_plus::addHotSpot() hotspotStyle._styleID = static_cast(style_hotspot); _pEditView->execute(SCI_STYLEGETFONT, idStyleMSBunset, (LPARAM)fontNameA); TCHAR *generic_fontname = new TCHAR[128]; -#ifdef UNICODE + WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance(); const wchar_t * fontNameW = wmc->char2wchar(fontNameA, _nativeLangSpeaker.getLangEncoding()); lstrcpy(generic_fontname, fontNameW); -#else - lstrcpy(generic_fontname, fontNameA); -#endif hotspotStyle._fontName = generic_fontname; hotspotStyle._fgColor = _pEditView->execute(SCI_STYLEGETFORE, idStyleMSBunset); diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index 65dc1e7d6..4b87e020c 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -385,7 +385,7 @@ public: return _styleArray[index]; }; - bool hasEnoughSpace() {return (_nbStyler < SCE_USER_STYLE_TOTAL_STYLES);}; + bool hasEnoughSpace() {return (_nbStyler < SCE_STYLE_ARRAY_SIZE);}; void addStyler(int styleID, TiXmlNode *styleNode); void addStyler(int styleID, const TCHAR *styleName) {