Fix by Laurent Desnogues for my feeble attempt at a fix

This commit is contained in:
Thilo Schulz 2011-06-21 19:33:02 +00:00
parent 2d1187b287
commit d9ea902c31

View file

@ -427,10 +427,12 @@ static void GraphicsOptions_GetAspectRatios( void )
char str[ sizeof(ratioBuf[0]) ]; char str[ sizeof(ratioBuf[0]) ];
// calculate resolution's aspect ratio // calculate resolution's aspect ratio
x = strchr( resolutions[r], 'x' ) + 1; x = strchr( resolutions[r], 'x' );
if(!x) if(!x)
continue; continue;
x++;
Q_strncpyz( str, resolutions[r], x-resolutions[r] ); Q_strncpyz( str, resolutions[r], x-resolutions[r] );
w = atoi( str ); w = atoi( str );