mirror of
				https://github.com/godotengine/godot.git
				synced 2025-11-04 07:31:16 +00:00 
			
		
		
		
	Merge pull request #102803 from bruvzg/msvc_ftelli
[Windows] Add missing opened file check.
This commit is contained in:
		
						commit
						b3feaab96f
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -308,6 +308,8 @@ void FileAccessWindows::seek_end(int64_t p_position) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
uint64_t FileAccessWindows::get_position() const {
 | 
					uint64_t FileAccessWindows::get_position() const {
 | 
				
			||||||
 | 
						ERR_FAIL_NULL_V_MSG(f, 0, "File must be opened before use.");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	int64_t aux_position = _ftelli64(f);
 | 
						int64_t aux_position = _ftelli64(f);
 | 
				
			||||||
	if (aux_position < 0) {
 | 
						if (aux_position < 0) {
 | 
				
			||||||
		check_errors();
 | 
							check_errors();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue