Browse Source

Solve compiling error & fix a regression of "new #"

The regression is introduced by:
f7d9e7c095 (diff-2d5c277be2799a7e43a90232d8ef9add2e788e252c8692bf9416abc69836957d)
pull/15388/head
Don Ho 5 months ago
parent
commit
dbef8cea91
  1. 14
      PowerEditor/src/MISC/sha1/sha1.h
  2. 2
      PowerEditor/src/ScintillaComponent/Buffer.cpp

14
PowerEditor/src/MISC/sha1/sha1.h

@ -153,6 +153,20 @@
#ifdef _MSC_VER
#include <tchar.h>
#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

2
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<int>(nextUntitledNewNumber());
wsprintf(nb, L"%d", static_cast<int>(nextUntitledNewNumber()));
newTitle += nb;
Document doc = static_cast<Document>(_pscratchTilla->execute(SCI_CREATEDOCUMENT, 0, SC_DOCUMENTOPTION_TEXT_LARGE)); // this already sets a reference for filemanager

Loading…
Cancel
Save