From 39c0a0f08d053c37cabcc3c7cc858eb85cce82e6 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 24 Sep 2003 00:59:53 +0000 Subject: [PATCH] make cluster recursion a warning rather than an error (see how this goes) --- tools/qfvis/source/flow.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/qfvis/source/flow.c b/tools/qfvis/source/flow.c index d57474150..f55f9c429 100644 --- a/tools/qfvis/source/flow.c +++ b/tools/qfvis/source/flow.c @@ -60,14 +60,17 @@ static __attribute__ ((unused)) const char rcsid[] = #include "vis.h" #include "options.h" -static void +static int CheckStack (cluster_t *cluster, threaddata_t *thread) { pstack_t *portal; for (portal = thread->pstack_head.next; portal; portal = portal->next) - if (portal->cluster == cluster) - Sys_Error ("CheckStack: cluster recursion"); + if (portal->cluster == cluster) { + printf ("CheckStack: cluster recursion\n"); + return 1; + } + return 0; } /* @@ -208,7 +211,8 @@ RecursiveClusterFlow (int clusternum, threaddata_t *thread, pstack_t *prevstack) c_chains++; cluster = &clusters[clusternum]; - CheckStack(cluster, thread); + if (CheckStack(cluster, thread)) + return; // mark the cluster as visible if (!(thread->clustervis[clusternum >> 3] & (1 << (clusternum & 7)))) {