Fix to (#5051) - strchr in GraphicsOptions_GetAspectRatios() might return NULL for some strange reason

This commit is contained in:
Thilo Schulz 2011-06-21 11:45:34 +00:00
parent 90ede2cb48
commit 6a3142d2c1

View file

@ -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 );