diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2017-10-08 19:17:39 +0300 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-10-08 19:41:54 +0300 |
commit | 04785f3c8b7194c35327c9d928f165e3109be2ef (patch) | |
tree | d56c0cdda6a5b85a8c11986848137c5fb5a39d4e | |
parent | 65731323075bb582e5ebf05fddc3405d7e3b47c0 (diff) | |
download | subsurface-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>
-rw-r--r-- | core/membuffer.c | 2 |
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++) { |