diff --git a/PowerEditor/src/MISC/sha1/sha1.h b/PowerEditor/src/MISC/sha1/sha1.h index ee9f7d75c..718bbc2a5 100644 --- a/PowerEditor/src/MISC/sha1/sha1.h +++ b/PowerEditor/src/MISC/sha1/sha1.h @@ -153,6 +153,20 @@ #ifdef _MSC_VER #include #else +#ifndef TCHAR +#define TCHAR char +#endif +#ifndef _T +#define _T(__x) (__x) +#define _tmain main +#define _tprintf printf +#define _getts gets +#define _tcslen strlen +#define _tfopen fopen +#define _tcscpy strcpy +#define _tcscat strcat +#define _sntprintf snprintf +#endif #endif #endif diff --git a/PowerEditor/src/ScintillaComponent/Buffer.cpp b/PowerEditor/src/ScintillaComponent/Buffer.cpp index 78c81eed7..c7448cd0b 100644 --- a/PowerEditor/src/ScintillaComponent/Buffer.cpp +++ b/PowerEditor/src/ScintillaComponent/Buffer.cpp @@ -1353,7 +1353,7 @@ BufferID FileManager::newEmptyDocument() wstring newTitle = ((NppParameters::getInstance()).getNativeLangSpeaker())->getLocalizedStrFromID("tab-untitled-string", UNTITLED_STR); wchar_t nb[10]; - wsprintf(nb, L"%d"), static_cast(nextUntitledNewNumber()); + wsprintf(nb, L"%d", static_cast(nextUntitledNewNumber())); newTitle += nb; Document doc = static_cast(_pscratchTilla->execute(SCI_CREATEDOCUMENT, 0, SC_DOCUMENTOPTION_TEXT_LARGE)); // this already sets a reference for filemanager