# HG changeset patch # User Chong Yidong # Date 1216616619 0 # Node ID 790746f5790018a076223c4054f9597385637e05 # Parent dbe6e915502f6d958bf77024924af12e6d54e750 (print_object): Check print_depth before searching for circularities. diff -r dbe6e915502f -r 790746f57900 src/print.c --- a/src/print.c Mon Jul 21 05:03:17 2008 +0000 +++ b/src/print.c Mon Jul 21 05:03:39 2008 +0000 @@ -1560,6 +1560,10 @@ QUIT; + /* See similar code in print_preprocess. */ + if (print_depth > PRINT_CIRCLE) + error ("Apparently circular structure being printed"); + /* Detect circularities and truncate them. */ if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) || COMPILEDP (obj) || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) @@ -1610,9 +1614,6 @@ print_depth++; - /* See similar code in print_preprocess. */ - if (print_depth > PRINT_CIRCLE) - error ("Apparently circular structure being printed"); #ifdef MAX_PRINT_CHARS if (max_print && print_chars > max_print) {