mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-27 22:42:09 +00:00
Fix to (#5051) - strchr in GraphicsOptions_GetAspectRatios() might return NULL for some strange reason
This commit is contained in:
parent
90ede2cb48
commit
6a3142d2c1
1 changed files with 4 additions and 0 deletions
|
@ -428,6 +428,10 @@ static void GraphicsOptions_GetAspectRatios( void )
|
|||
|
||||
// calculate resolution's aspect ratio
|
||||
x = strchr( resolutions[r], 'x' ) + 1;
|
||||
|
||||
if(!x)
|
||||
continue;
|
||||
|
||||
Q_strncpyz( str, resolutions[r], x-resolutions[r] );
|
||||
w = atoi( str );
|
||||
h = atoi( x );
|
||||
|
|
Loading…
Reference in a new issue