summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2004-07-17 14:54:56 +0000
committerRichard M. Stallman <rms@gnu.org>2004-07-17 14:54:56 +0000
commit15479e8b2fc5944d3b9254edbec69c4d2f3bb86c (patch)
treea810cf7bffe30eb3069dee4066b03f0da607bc40
parent0c1c1b936d4f9043639b88e5e8b209db6e290408 (diff)
downloademacs-15479e8b2fc5944d3b9254edbec69c4d2f3bb86c.tar.gz
(print_preprocess): Test for print_depth at limit
before entering in being_printed.
-rw-r--r--src/print.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/print.c b/src/print.c
index 0abd30b5ce0..5a0f7fe6220 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1284,6 +1284,11 @@ print_preprocess (obj)
int loop_count = 0;
Lisp_Object halftail;
+ /* Give up if we go so deep that print_object will get an error. */
+ /* See similar code in print_object. */
+ if (print_depth >= PRINT_CIRCLE)
+ return;
+
/* Avoid infinite recursion for circular nested structure
in the case where Vprint_circle is nil. */
if (NILP (Vprint_circle))
@@ -1294,11 +1299,6 @@ print_preprocess (obj)
being_printed[print_depth] = obj;
}
- /* Give up if we go so deep that print_object will get an error. */
- /* See similar code in print_object. */
- if (print_depth >= PRINT_CIRCLE)
- return;
-
print_depth++;
halftail = obj;