mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 05:31:29 +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