summaryrefslogtreecommitdiffstats
path: root/Modules/_csv.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_csv.c')
-rw-r--r--Modules/_csv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_csv.c b/Modules/_csv.c
index 4704c16..a341eb4 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -1104,6 +1104,8 @@ join_append_lineterminator(WriterObj *self)
char *terminator;
terminator_len = PyString_Size(self->dialect->lineterminator);
+ if (terminator_len == -1)
+ return 0;
/* grow record buffer if necessary */
if (!join_check_rec_size(self, self->rec_len + terminator_len))