mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	A bugfix for r61813, it would fail if the data size was >=2**32.
This commit is contained in:
		
							parent
							
								
									be446b4ab7
								
							
						
					
					
						commit
						ac830e932d
					
				
					 1 changed files with 1 additions and 5 deletions
				
			
		|  | @ -15,10 +15,6 @@ | |||
| 
 | ||||
| READ, WRITE = 1, 2 | ||||
| 
 | ||||
| def U32(i): | ||||
|     """Return the low-order 32 bits, as a non-negative int or long.""" | ||||
|     return i & 0xFFFFFFFFL | ||||
| 
 | ||||
| def write32u(output, value): | ||||
|     # The L format writes the bit pattern correctly whether signed | ||||
|     # or unsigned. | ||||
|  | @ -306,7 +302,7 @@ def _read_eof(self): | |||
|         if crc32 != self.crc: | ||||
|             raise IOError("CRC check failed %s != %s" % (hex(crc32), | ||||
|                                                          hex(self.crc))) | ||||
|         elif isize != self.size: | ||||
|         elif isize != (self.size & 0xffffffffL): | ||||
|             raise IOError, "Incorrect length of data produced" | ||||
| 
 | ||||
|     def close(self): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Gregory P. Smith
						Gregory P. Smith