# HG changeset patch # User Richard M. Stallman # Date 1090076096 0 # Node ID 66c2afb52fc1c51684de7e7177a718de2fae14d0 # Parent 1e0c70660fff22ac5a95c9a4b34ace997acef04d (print_preprocess): Test for print_depth at limit before entering in being_printed. diff -r 1e0c70660fff -r 66c2afb52fc1 src/print.c --- a/src/print.c Sat Jul 17 14:50:58 2004 +0000 +++ b/src/print.c Sat Jul 17 14:54:56 2004 +0000 @@ -1284,6 +1284,11 @@ 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 @@ 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;