From 2174dcb06187098ceecad4e932ddfc95ffc36612 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 15 Sep 1999 22:48:09 +0000 Subject: [PATCH] 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 . Patch follows. --- Python/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/compile.c b/Python/compile.c index 1e937e492ab..e4e37d53f8c 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -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) {