]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/forum_view.c
Handle messages that are empty (or which appear empty to MSG4 because they consist...
[citadel.git] / webcit-ng / forum_view.c
index 846c417b5e32bfc4ecaa548b3e335f103fe0f536..80320ec84b04ead23e95f6f36f416e4c1de8ab0a 100644 (file)
@@ -93,7 +93,12 @@ void json_render_one_message(struct http_transaction *h, struct ctdlsession *c,
                                striplt(content_type);
                        }
                }
-               raw_msg = ctdl_readtextmsg(c);
+               if (!strcmp(buf, "000")) {              // if we have an empty message, don't try to read further
+                       raw_msg = NULL;
+               }
+               else {
+                       raw_msg = ctdl_readtextmsg(c);
+               }
        }
        else {
                raw_msg = NULL;