mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Tim Peters writes:
For a long time I've seen absurd tracebacks under -O (e.g., negative line numbers), but very rarely. Since I was looking at tracebacks anyway, thought I'd track it down. Turns out to be Guido's only predictable blind spot <wink -- "char" is signed on some non-GvR systems>. Patch follows.
This commit is contained in:
		
							parent
							
								
									f3c5f5c044
								
							
						
					
					
						commit
						2174dcb061
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -3451,7 +3451,7 @@ PyCode_Addr2Line(co, addrq) | |||
| 	int addrq; | ||||
| { | ||||
| 	int size = PyString_Size(co->co_lnotab) / 2; | ||||
| 	char *p = PyString_AsString(co->co_lnotab); | ||||
| 	unsigned char *p = (unsigned char*)PyString_AsString(co->co_lnotab); | ||||
| 	int line = co->co_firstlineno; | ||||
| 	int addr = 0; | ||||
| 	while (--size >= 0) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum