From 59d5f5ce59e9080dc28f1cbf1609555659b3577e Mon Sep 17 00:00:00 2001 From: Balazs Racz Date: Sun, 4 Feb 2024 06:09:47 -0800 Subject: [PATCH] Adds trailing zero to the cdi XML file written to the filesystem. --- src/openlcb/CompileCdiMain.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/openlcb/CompileCdiMain.cxx b/src/openlcb/CompileCdiMain.cxx index 2569b1d87..aef8578a8 100644 --- a/src/openlcb/CompileCdiMain.cxx +++ b/src/openlcb/CompileCdiMain.cxx @@ -27,6 +27,9 @@ void render_cdi_helper(const CdiType &t, string ns, string name) t.config_renderer().render_cdi(&payload); if (raw_render) { + // Adds trailing zero to the file written. + payload.push_back(0); + // Writes the file. string filename = name + ".xmlout"; printf("Writing %d bytes to %s\n", (int)payload.size(), filename.c_str());