mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Shift bits before making value negative
This commit is contained in:
		
							parent
							
								
									7a6664d70b
								
							
						
					
					
						commit
						78b0e06dbb
					
				| 
						 | 
					@ -603,7 +603,7 @@ static void
 | 
				
			||||||
bc6_sign_extend(UINT16 *v, int prec) {
 | 
					bc6_sign_extend(UINT16 *v, int prec) {
 | 
				
			||||||
    int x = *v;
 | 
					    int x = *v;
 | 
				
			||||||
    if (x & (1 << (prec - 1))) {
 | 
					    if (x & (1 << (prec - 1))) {
 | 
				
			||||||
        x |= -1 << prec;
 | 
					        x |= -(1 << prec);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    *v = (UINT16)x;
 | 
					    *v = (UINT16)x;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user