diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/xml.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -10,6 +10,7 @@ #include "houdini.h" #define BUFFER_SIZE 100 +#define MAX_INDENT 40 // Functions to convert cmark_nodes to XML strings. @@ -30,7 +31,7 @@ struct render_state { static CMARK_INLINE void indent(struct render_state *state) { int i; - for (i = 0; i < state->indent; i++) { + for (i = 0; i < state->indent && i < MAX_INDENT; i++) { cmark_strbuf_putc(state->xml, ' '); } } |