Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prefer unsafe versions of _tcscpy and _tcsncpy in the interest of bac…

…kwards compatibility (e.g., WinXP)
  • Loading branch information...
commit c96688bd7994692d4f5a8b250e89d22cfa1ec5f6 1 parent bf66cdd
@alexd authored
Showing with 4 additions and 15 deletions.
  1. +4 −15 metapad.c
View
19 metapad.c
@@ -1612,11 +1612,7 @@ int FixShortFilename(TCHAR *szSrc, TCHAR *szDest)
}
}
- #ifndef __MINGW32__
- _tcsncpy_s(sDir, MAXFN, szDest, nDestPos);
- #else
_tcsncpy(sDir, szDest, nDestPos);
- #endif
sDir[nDestPos] = '*';
sDir[nDestPos + 1] = '\0';
@@ -1629,17 +1625,10 @@ int FixShortFilename(TCHAR *szSrc, TCHAR *szDest)
while (bOK && lstrcmpi(FindFileData.cFileName, sName) != 0 && lstrcmpi(FindFileData.cAlternateFileName, sName) != 0)
bOK = FindNextFile(hHandle, &FindFileData);
- #ifndef __MINGW32__
- if (bOK)
- _tcscpy_s(&szDest[nDestPos], sizeof(FindFileData.cFileName), FindFileData.cFileName);
- else
- _tcscpy_s(&szDest[nDestPos], sizeof(sName), sName);
- #else
- if (bOK)
- _tcscpy(&szDest[nDestPos], FindFileData.cFileName);
- else
- _tcscpy(&szDest[nDestPos], sName);
- #endif
+ if (bOK)
+ _tcscpy(&szDest[nDestPos], FindFileData.cFileName);
+ else
+ _tcscpy(&szDest[nDestPos], sName);
// Fix the length of szDest
nDestPos = _tcslen(szDest);
Please sign in to comment.
Something went wrong with that request. Please try again.