Fix MinGW/GCC issues

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7020 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2018-10-16 20:58:09 +00:00
parent 87139b31a3
commit 0040a97e43
3 changed files with 29 additions and 39 deletions

View file

@ -306,7 +306,7 @@ template<class R, class T> inline R debugtruncate_cast(T t,const char*f,unsigned
#ifdef MAKENSIS
if (sizeof(T) > sizeof(R) && !( (t <= (T)(~((R)0))) )) {
_tprintf(_T("unsafe truncate_cast: %") NPRIns _T(":%u\n"),f,l);
if (sizeof(T) <= sizeof(void*)) _tprintf(_T("\t0x%p > %0xp\n"),(void*)(UINT_PTR)(t),(void*)(UINT_PTR)(~((R)0)));
if (sizeof(T) <= sizeof(void*)) _tprintf(_T("\t%ph > %ph\n"),(void*)(UINT_PTR)(t),(void*)(UINT_PTR)(~((R)0)));
}
#endif
return internaltruncate_cast<R>(t);