summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2008-07-21 05:05:56 +0000
committerChong Yidong <cyd@stupidchicken.com>2008-07-21 05:05:56 +0000
commit782d325b52d1c9b92371e0538ad735317277efff (patch)
tree217990fa18d012f7b7e68f527f5a577e40cfa052 /src
parent2a836a43300602aeed6eac35d27776526aa33714 (diff)
downloademacs-782d325b52d1c9b92371e0538ad735317277efff.tar.gz
(print_object): Check print_depth before searching for circularities.
Diffstat (limited to 'src')
-rw-r--r--src/print.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/print.c b/src/print.c
index 88abdacfe60..a474fa31e81 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1487,6 +1487,10 @@ print_object (obj, printcharfun, escapeflag)
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)
@@ -1537,9 +1541,6 @@ print_object (obj, printcharfun, escapeflag)
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)
{