From ad420dbb936f7302666e20986a211e23bbd4ac53 Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Thu, 31 Jan 2013 15:35:57 +1300 Subject: [PATCH] hexout: add proper terminator record. --- ui/devcmd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/devcmd.c b/ui/devcmd.c index 7dfca0f..c01ad80 100644 --- a/ui/devcmd.c +++ b/ui/devcmd.c @@ -484,6 +484,12 @@ int cmd_hexout(char **arg) if (hexout_flush(&hexout) < 0) goto fail; + + if (fprintf(hexout.file, ":00000001FF\n") < 0) { + pr_error("hexout: failed to write terminator\n"); + goto fail; + } + if (fclose(hexout.file) < 0) { pr_error("hexout: error on close"); return -1;