diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-07-21 05:03:39 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-07-21 05:03:39 +0000 |
commit | 76afdf7e9229ae3bbffbe6cd60d2fcbb513c761b (patch) | |
tree | 79784c60c7310359d1041df42933bf9deb8b3283 /src/print.c | |
parent | b42f411561d3bbbc4cc4a0d1e5a025fd6d9e8ccb (diff) | |
download | emacs-76afdf7e9229ae3bbffbe6cd60d2fcbb513c761b.tar.gz |
(print_object): Check print_depth before searching for circularities.
Diffstat (limited to 'src/print.c')
-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 8fac2660d0f..dc4c40aabab 100644 --- a/src/print.c +++ b/src/print.c @@ -1560,6 +1560,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) || SUB_CHAR_TABLE_P (obj) @@ -1610,9 +1614,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) { |