diff options
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 8fac2660d0f..dc4c40aabab 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1560,6 +1560,10 @@ print_object (obj, printcharfun, escapeflag) | |||
| 1560 | 1560 | ||
| 1561 | QUIT; | 1561 | QUIT; |
| 1562 | 1562 | ||
| 1563 | /* See similar code in print_preprocess. */ | ||
| 1564 | if (print_depth > PRINT_CIRCLE) | ||
| 1565 | error ("Apparently circular structure being printed"); | ||
| 1566 | |||
| 1563 | /* Detect circularities and truncate them. */ | 1567 | /* Detect circularities and truncate them. */ |
| 1564 | if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) | 1568 | if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) |
| 1565 | || COMPILEDP (obj) || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) | 1569 | || COMPILEDP (obj) || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) |
| @@ -1610,9 +1614,6 @@ print_object (obj, printcharfun, escapeflag) | |||
| 1610 | 1614 | ||
| 1611 | print_depth++; | 1615 | print_depth++; |
| 1612 | 1616 | ||
| 1613 | /* See similar code in print_preprocess. */ | ||
| 1614 | if (print_depth > PRINT_CIRCLE) | ||
| 1615 | error ("Apparently circular structure being printed"); | ||
| 1616 | #ifdef MAX_PRINT_CHARS | 1617 | #ifdef MAX_PRINT_CHARS |
| 1617 | if (max_print && print_chars > max_print) | 1618 | if (max_print && print_chars > max_print) |
| 1618 | { | 1619 | { |