aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2004-07-17 14:54:56 +0000
committerRichard M. Stallman2004-07-17 14:54:56 +0000
commit15479e8b2fc5944d3b9254edbec69c4d2f3bb86c (patch)
treea810cf7bffe30eb3069dee4066b03f0da607bc40
parent0c1c1b936d4f9043639b88e5e8b209db6e290408 (diff)
downloademacs-15479e8b2fc5944d3b9254edbec69c4d2f3bb86c.tar.gz
emacs-15479e8b2fc5944d3b9254edbec69c4d2f3bb86c.zip
(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)
1284 int loop_count = 0; 1284 int loop_count = 0;
1285 Lisp_Object halftail; 1285 Lisp_Object halftail;
1286 1286
1287 /* Give up if we go so deep that print_object will get an error. */
1288 /* See similar code in print_object. */
1289 if (print_depth >= PRINT_CIRCLE)
1290 return;
1291
1287 /* Avoid infinite recursion for circular nested structure 1292 /* Avoid infinite recursion for circular nested structure
1288 in the case where Vprint_circle is nil. */ 1293 in the case where Vprint_circle is nil. */
1289 if (NILP (Vprint_circle)) 1294 if (NILP (Vprint_circle))
@@ -1294,11 +1299,6 @@ print_preprocess (obj)
1294 being_printed[print_depth] = obj; 1299 being_printed[print_depth] = obj;
1295 } 1300 }
1296 1301
1297 /* Give up if we go so deep that print_object will get an error. */
1298 /* See similar code in print_object. */
1299 if (print_depth >= PRINT_CIRCLE)
1300 return;
1301
1302 print_depth++; 1302 print_depth++;
1303 halftail = obj; 1303 halftail = obj;
1304 1304