From bb0907bc96316565c3582580bc0af3c09844bb26 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 24 Mar 2011 20:08:44 +0000 Subject: [PATCH] Fix underflow/segfault from negative ctypes and debug text --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index caf7bdbff..2a0d8fe0c 100644 --- a/src/main.c +++ b/src/main.c @@ -2856,7 +2856,7 @@ int main(int argc, char *argv[]) if (DEBUG_MODE) { int tctype = parts[cr>>8].ctype; - if (tctype>=PT_NUM || (cr&0xFF)==PT_PHOT) + if (tctype>=PT_NUM || tctype<0 || (cr&0xFF)==PT_PHOT) tctype = 0; if ((cr&0xFF)==PT_PIPE) {