fix crash in some cases

This commit is contained in:
nillerusr 2023-10-08 07:31:07 +03:00
parent c1e2036f4b
commit 9fbed1af34
6 changed files with 12 additions and 6 deletions

View file

@ -65,9 +65,12 @@ extern void longjmp( jmp_buf, int ) __attribute__((noreturn));
#define JPEGLIB_USE_STDIO #define JPEGLIB_USE_STDIO
#if ANDROID #if ANDROID
#include "android/jpeglib/jpeglib.h" #include "android/jpeglib/jpeglib.h"
#else #elif defined WIN32
#include "jpeglib/jpeglib.h" #include "jpeglib/jpeglib.h"
#else
#include <jpeglib.h>
#endif #endif
#undef JPEGLIB_USE_STDIO #undef JPEGLIB_USE_STDIO

View file

@ -4934,7 +4934,7 @@ static bool EnumerateLeafInBox_R(mnode_t * RESTRICT node, const EnumLeafBoxInfo_
*/ */
// take advantage of high throughput/high latency // take advantage of high throughput/high latency
fltx4 planeNormal = LoadAlignedSIMD( plane->normal.Base() ); fltx4 planeNormal = LoadUnaligned3SIMD( plane->normal.Base() );
fltx4 vecBoxMin = LoadAlignedSIMD(pInfo->m_vecBoxMin); fltx4 vecBoxMin = LoadAlignedSIMD(pInfo->m_vecBoxMin);
fltx4 vecBoxMax = LoadAlignedSIMD(pInfo->m_vecBoxMax); fltx4 vecBoxMax = LoadAlignedSIMD(pInfo->m_vecBoxMax);
fltx4 cornermin, cornermax; fltx4 cornermin, cornermax;

View file

@ -4203,7 +4203,7 @@ bool CBaseFileSystem::FindNextFileInVPKOrPakHelper( FindData_t *pFindData )
{ {
V_strncpy( pFindData->findData.cFileName, V_UnqualifiedFileName( pFindData->m_fileMatchesFromVPKOrPak[0] ), sizeof( pFindData->findData.cFileName ) ); V_strncpy( pFindData->findData.cFileName, V_UnqualifiedFileName( pFindData->m_fileMatchesFromVPKOrPak[0] ), sizeof( pFindData->findData.cFileName ) );
pFindData->findData.dwFileAttributes = 0; pFindData->findData.dwFileAttributes = 0;
delete pFindData->m_fileMatchesFromVPKOrPak.Head(); delete[] pFindData->m_fileMatchesFromVPKOrPak.Head();
pFindData->m_fileMatchesFromVPKOrPak.RemoveMultipleFromHead( 1 ); pFindData->m_fileMatchesFromVPKOrPak.RemoveMultipleFromHead( 1 );
return true; return true;

View file

@ -114,7 +114,7 @@ inline T clamp( T const &val, T const &minVal, T const &maxVal )
// FIXME: this should move to a different file // FIXME: this should move to a different file
struct cplane_t struct cplane_t
{ {
VectorAligned normal; Vector normal;
float dist; float dist;
byte type; // for fast side tests byte type; // for fast side tests
byte signbits; // signx + (signy<<1) + (signz<<1) byte signbits; // signx + (signy<<1) + (signz<<1)

View file

@ -1500,6 +1500,9 @@ void FileOpenDialog::OnOpen()
char pFileName[MAX_PATH]; char pFileName[MAX_PATH];
GetSelectedFileName( pFileName, sizeof( pFileName ) ); GetSelectedFileName( pFileName, sizeof( pFileName ) );
if( !pFileName[0] )
return;
int nLen = Q_strlen( pFileName ); int nLen = Q_strlen( pFileName );
bool bSpecifiedDirectory = ( pFileName[nLen-1] == '/' || pFileName[nLen-1] == '\\' ) && (!IsOSX() || ( IsOSX() && !Q_stristr( pFileName, ".app" ) ) ); bool bSpecifiedDirectory = ( pFileName[nLen-1] == '/' || pFileName[nLen-1] == '\\' ) && (!IsOSX() || ( IsOSX() && !Q_stristr( pFileName, ".app" ) ) );
Q_StripTrailingSlash( pFileName ); Q_StripTrailingSlash( pFileName );

View file

@ -239,9 +239,9 @@ def define_platform(conf):
'_DLL_EXT=.so' '_DLL_EXT=.so'
]) ])
# if conf.env.DEST_OS != 'win32': if conf.env.DEST_OS != 'win32':
conf.define('NO_MEMOVERRIDE_NEW_DELETE', 1)
# conf.define('NO_MALLOC_OVERRIDE', 1) # conf.define('NO_MALLOC_OVERRIDE', 1)
# conf.define('NO_MEMOVERRIDE_NEW_DELETE', 1)
if conf.options.DEBUG_ENGINE: if conf.options.DEBUG_ENGINE:
conf.env.append_unique('DEFINES', [ conf.env.append_unique('DEFINES', [