aboutsummaryrefslogtreecommitdiffstats
path: root/core/membuffer.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2017-10-08 19:17:39 +0300
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-10-08 19:41:54 +0300
commit04785f3c8b7194c35327c9d928f165e3109be2ef (patch)
treed56c0cdda6a5b85a8c11986848137c5fb5a39d4e /core/membuffer.c
parent65731323075bb582e5ebf05fddc3405d7e3b47c0 (diff)
downloadsubsurface-04785f3c8b7194c35327c9d928f165e3109be2ef.tar.gz
Fix crash when text empty
Exporting to divelogs.de triggered this bug when divesite name is empty. Fixes #656 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'core/membuffer.c')
-rw-r--r--core/membuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/membuffer.c b/core/membuffer.c
index aa08bb5ea..18a0203fc 100644
--- a/core/membuffer.c
+++ b/core/membuffer.c
@@ -213,7 +213,7 @@ void put_quoted(struct membuffer *b, const char *text, int is_attribute, int is_
{
const char *p = text;
- for (;;) {
+ for (;text;) {
const char *escape;
switch (*p++) {