From 98bb570aec7f5087863562f8967c148fa119be9d Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 28 Aug 2015 03:06:40 -0500 Subject: [PATCH] log.c: fix off-by-one error. --- artiq/frontend/artiq_coretool.py | 2 +- soc/runtime/log.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/frontend/artiq_coretool.py b/artiq/frontend/artiq_coretool.py index 92af19734..ed8224511 100755 --- a/artiq/frontend/artiq_coretool.py +++ b/artiq/frontend/artiq_coretool.py @@ -64,7 +64,7 @@ def main(): comm.check_ident() if args.action == "log": - print(comm.get_log()) + print(comm.get_log(), end='') elif args.action == "cfg-read": value = comm.flash_storage_read(args.key) if not value: diff --git a/soc/runtime/log.c b/soc/runtime/log.c index cb64bea00..6ac28fc1e 100644 --- a/soc/runtime/log.c +++ b/soc/runtime/log.c @@ -56,8 +56,8 @@ void log_get(char *outbuf) { int i, j; - j = buffer_index + 1; - for(i=0;i