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>
This commit is contained in:
Miika Turkia 2017-10-08 19:17:39 +03:00 committed by Lubomir I. Ivanov
parent 6573132307
commit 04785f3c8b

View file

@ -213,7 +213,7 @@ void put_quoted(struct membuffer *b, const char *text, int is_attribute, int is_
{ {
const char *p = text; const char *p = text;
for (;;) { for (;text;) {
const char *escape; const char *escape;
switch (*p++) { switch (*p++) {