diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-07-21 05:05:56 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-07-21 05:05:56 +0000 |
commit | 782d325b52d1c9b92371e0538ad735317277efff (patch) | |
tree | 217990fa18d012f7b7e68f527f5a577e40cfa052 /src | |
parent | 2a836a43300602aeed6eac35d27776526aa33714 (diff) | |
download | emacs-782d325b52d1c9b92371e0538ad735317277efff.tar.gz |
(print_object): Check print_depth before searching for circularities.
Diffstat (limited to 'src')
-rw-r--r-- | src/print.c | 7 |
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) { |