Skip to content

Commit b8558de

Browse files
committed
fix crash in some cases
1 parent 047f8b1 commit b8558de

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

common/imageutils.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,12 @@ extern void longjmp( jmp_buf, int ) __attribute__((noreturn));
6565
#define JPEGLIB_USE_STDIO
6666
#if ANDROID
6767
#include "android/jpeglib/jpeglib.h"
68-
#else
68+
#elif defined WIN32
6969
#include "jpeglib/jpeglib.h"
70+
#else
71+
#include <jpeglib.h>
7072
#endif
73+
7174
#undef JPEGLIB_USE_STDIO
7275

7376

engine/gl_rsurf.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4934,7 +4934,7 @@ static bool EnumerateLeafInBox_R(mnode_t * RESTRICT node, const EnumLeafBoxInfo_
49344934
*/
49354935

49364936
// take advantage of high throughput/high latency
4937-
fltx4 planeNormal = LoadAlignedSIMD( plane->normal.Base() );
4937+
fltx4 planeNormal = LoadUnaligned3SIMD( plane->normal.Base() );
49384938
fltx4 vecBoxMin = LoadAlignedSIMD(pInfo->m_vecBoxMin);
49394939
fltx4 vecBoxMax = LoadAlignedSIMD(pInfo->m_vecBoxMax);
49404940
fltx4 cornermin, cornermax;

filesystem/basefilesystem.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4203,7 +4203,7 @@ bool CBaseFileSystem::FindNextFileInVPKOrPakHelper( FindData_t *pFindData )
42034203
{
42044204
V_strncpy( pFindData->findData.cFileName, V_UnqualifiedFileName( pFindData->m_fileMatchesFromVPKOrPak[0] ), sizeof( pFindData->findData.cFileName ) );
42054205
pFindData->findData.dwFileAttributes = 0;
4206-
delete pFindData->m_fileMatchesFromVPKOrPak.Head();
4206+
delete[] pFindData->m_fileMatchesFromVPKOrPak.Head();
42074207
pFindData->m_fileMatchesFromVPKOrPak.RemoveMultipleFromHead( 1 );
42084208

42094209
return true;

public/mathlib/mathlib.h

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

vgui2/vgui_controls/FileOpenDialog.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1500,6 +1500,9 @@ void FileOpenDialog::OnOpen()
15001500
char pFileName[MAX_PATH];
15011501
GetSelectedFileName( pFileName, sizeof( pFileName ) );
15021502

1503+
if( !pFileName[0] )
1504+
return;
1505+
15031506
int nLen = Q_strlen( pFileName );
15041507
bool bSpecifiedDirectory = ( pFileName[nLen-1] == '/' || pFileName[nLen-1] == '\\' ) && (!IsOSX() || ( IsOSX() && !Q_stristr( pFileName, ".app" ) ) );
15051508
Q_StripTrailingSlash( pFileName );

wscript

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ def define_platform(conf):
239239
'_DLL_EXT=.so'
240240
])
241241

242-
# if conf.env.DEST_OS != 'win32':
242+
if conf.env.DEST_OS != 'win32':
243+
conf.define('NO_MEMOVERRIDE_NEW_DELETE', 1)
243244
# conf.define('NO_MALLOC_OVERRIDE', 1)
244-
# conf.define('NO_MEMOVERRIDE_NEW_DELETE', 1)
245245

246246
if conf.options.DEBUG_ENGINE:
247247
conf.env.append_unique('DEFINES', [

0 commit comments

Comments
 (0)