mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Additional check to return a friendly error when binary STL is not valid
This commit is contained in:
		
							parent
							
								
									eca6d0b6d0
								
							
						
					
					
						commit
						47bbe18de2
					
				
					 2 changed files with 2 additions and 1 deletions
				
			
		|  | @ -22,6 +22,7 @@ sub read_file { | |||
|         seek $fh, 80, 0; | ||||
|         read $fh, my $buf, 4; | ||||
|         my $triangle_count = unpack 'L', $buf; | ||||
|         die "STL file seems invalid, could not read facet count\n" if !defined $triangle_count; | ||||
|         my $expected_size = | ||||
|             + 80 # header | ||||
|             +  4 # count | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci