mirror of
				https://github.com/aap/librw.git
				synced 2025-11-04 08:50:09 +00:00 
			
		
		
		
	don't barf when when getFileContents can't open file
This commit is contained in:
		
							parent
							
								
									efc0c307d7
								
							
						
					
					
						commit
						92b215268a
					
				@ -1107,7 +1107,8 @@ uint8*
 | 
			
		||||
getFileContents(const char *name, uint32 *len)
 | 
			
		||||
{
 | 
			
		||||
	FILE *cf = fopen(name, "rb");
 | 
			
		||||
	assert(cf != nil);
 | 
			
		||||
	if(cf == nil)
 | 
			
		||||
		return nil;
 | 
			
		||||
	fseek(cf, 0, SEEK_END);
 | 
			
		||||
	*len = ftell(cf);
 | 
			
		||||
	fseek(cf, 0, SEEK_SET);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user