mirror of https://github.com/m-labs/artiq.git
log.c: fix off-by-one error.
This commit is contained in:
parent
30cdb209c6
commit
98bb570aec
|
@ -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:
|
||||
|
|
|
@ -56,7 +56,7 @@ void log_get(char *outbuf)
|
|||
{
|
||||
int i, j;
|
||||
|
||||
j = buffer_index + 1;
|
||||
j = buffer_index;
|
||||
for(i = 0; i < LOG_BUFFER_SIZE; i++) {
|
||||
outbuf[i] = buffer[j];
|
||||
j = (j + 1) % LOG_BUFFER_SIZE;
|
||||
|
|
Loading…
Reference in New Issue