diff options
Diffstat (limited to 'desktop/win32/source/rebase/rebase.cxx')
-rw-r--r-- | desktop/win32/source/rebase/rebase.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/desktop/win32/source/rebase/rebase.cxx b/desktop/win32/source/rebase/rebase.cxx index 5afc00b5b0..e712c8d548 100644 --- a/desktop/win32/source/rebase/rebase.cxx +++ b/desktop/win32/source/rebase/rebase.cxx @@ -44,6 +44,7 @@ #include <time.h> #include "sal/config.h" +#include <sal/macros.h> #include "tools/pathutils.hxx" #define MY_LENGTH(s) (sizeof (s) / sizeof *(s) - 1) @@ -120,7 +121,7 @@ void rebaseImagesInFolder( wchar_t* pszFolder, DWORD nNewImageBase ) { size_t len = lpLastSlash - pszFolder + 1; wcsncpy( szPattern, pszFolder, len ); - wcsncpy( szPattern + len, TEXT("*.dll"), sizeof(szPattern)/sizeof(szPattern[0]) - len ); + wcsncpy( szPattern + len, TEXT("*.dll"), SAL_N_ELEMENTS(szPattern) - len ); } WIN32_FIND_DATA aFindFileData; @@ -138,7 +139,7 @@ void rebaseImagesInFolder( wchar_t* pszFolder, DWORD nNewImageBase ) { size_t len = lpLastSlash - pszFolder + 1; wcsncpy( szLibFilePath, pszFolder, len ); - wcsncpy( szLibFilePath + len, aFindFileData.cFileName, sizeof(szLibFilePath)/sizeof(szLibFilePath[0]) - len ); + wcsncpy( szLibFilePath + len, aFindFileData.cFileName, SAL_N_ELEMENTS(szLibFilePath) - len ); } rebaseImage( szLibFilePath, nNewImageBase ); |