[quake3-commits] r2048 - trunk/code/q3_ui
    DONOTREPLY at icculus.org 
    DONOTREPLY at icculus.org
       
    Tue Jun 21 07:45:34 EDT 2011
    
    
  
Author: thilo
Date: 2011-06-21 07:45:34 -0400 (Tue, 21 Jun 2011)
New Revision: 2048
Modified:
   trunk/code/q3_ui/ui_video.c
Log:
Fix to (#5051) - strchr in GraphicsOptions_GetAspectRatios() might return NULL for some strange reason
Modified: trunk/code/q3_ui/ui_video.c
===================================================================
--- trunk/code/q3_ui/ui_video.c	2011-06-21 11:36:25 UTC (rev 2047)
+++ trunk/code/q3_ui/ui_video.c	2011-06-21 11:45:34 UTC (rev 2048)
@@ -428,6 +428,10 @@
 		
 		// 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 );
    
    
More information about the quake3-commits
mailing list