]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/matrix/matrix.qc
Apply a workaround to avoid empty sprintf calls in the notification system, also...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / matrix / matrix.qc
index c399c2aa6cf86e2d9a9ba910667c8cd1c926ba43..3ce4fcfc8ec01a3506d69bc12ab7ae0f89b07afd 100644 (file)
@@ -147,7 +147,7 @@ void MX_JLF_(entity fh, entity pass, int status)
     switch (status) {
         case URL_READY_CANWRITE: {
             fh.url_content_type = "application/json";
-            url_fputs(fh, sprintf("{}", pass.message));
+            url_fputs(fh, sprintf("{%s}", pass.message));
             url_fclose(fh);
             break;
         }
@@ -204,7 +204,8 @@ void MX_Say_(entity fh, entity pass, int status)
             fh.url_verb = "PUT";
             fh.url_content_type = "application/json";
             url_fputs(fh, sprintf("{\"msgtype\": \"m.text\", \"body\": \"%s\"}", pass.message));
-            strunzone(pass.message); delete(pass);
+            strfree(pass.message);
+            delete(pass);
             url_fclose(fh);
             break;
         }