Skip to content

Commit

Permalink
Solve compiling error & fix a regression of "new #"
Browse files Browse the repository at this point in the history
  • Loading branch information
donho committed Jul 1, 2024
1 parent a301ffc commit dbef8ce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions PowerEditor/src/MISC/sha1/sha1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/ScintillaComponent/Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dbef8ce

Please sign in to comment.