(linux) Fixed a sigsegv when drawing a color brush which is completely outside screen (The only way is to use the circle tool)
SDL_UpdateRect was crashing because of receiving negative Width or Height. This was due to Calculer_dimensions_clipees() clipping width or height so much that they become negative. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@222 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									b0cd961188
								
							
						
					
					
						commit
						83ef6ef4ac
					
				
							
								
								
									
										2
									
								
								graph.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								graph.c
									
									
									
									
									
								
							@ -1856,6 +1856,8 @@ void Afficher_pinceau(short X,short Y,byte Couleur,byte Preview)
 | 
			
		||||
      Largeur=Brosse_Largeur;
 | 
			
		||||
      Hauteur=Brosse_Hauteur;
 | 
			
		||||
      Calculer_dimensions_clipees(&Debut_X,&Debut_Y,&Largeur,&Hauteur);
 | 
			
		||||
      if (Largeur<=0 || Hauteur<=0)
 | 
			
		||||
        break;
 | 
			
		||||
      Debut_Compteur_X=Debut_X-(X-Brosse_Decalage_X);
 | 
			
		||||
      Debut_Compteur_Y=Debut_Y-(Y-Brosse_Decalage_Y);
 | 
			
		||||
      Fin_Compteur_X=Debut_Compteur_X+Largeur;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user