Bring back optimized mystrcpy(tmpbuf, _T("NUL")) from NSIS2
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6869 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
65bfc90ce7
commit
bcef20b32d
1 changed files with 5 additions and 1 deletions
|
@ -546,7 +546,11 @@ void RenameViaWininit(const TCHAR* prevName, const TCHAR* newName)
|
|||
|
||||
int spn; // length of the short path name in TCHARs.
|
||||
|
||||
mystrcpy(tmpbuf, _T("NUL"));
|
||||
// Optimized mystrcpy(tmpbuf, _T("NUL")):
|
||||
if (sizeof(TCHAR) == 1)
|
||||
*(UINT32*)tmpbuf = ((UINT32)'N' << 0) | ((UINT32)'U' << 8) | ((UINT32)'L' << 16) | ((UINT32)'\0' << 24);
|
||||
else
|
||||
*(UINT64*)tmpbuf = ((UINT64)'N' << 0) | ((UINT64)'U' << 16) | ((UINT64)'L' << 32) | ((UINT64)'\0' << 48);
|
||||
|
||||
if (newName) {
|
||||
// create the file if it's not already there to prevent GetShortPathName from failing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue