From c74837f75cbb7cbdd318ad5f7cac5e7019965957 Mon Sep 17 00:00:00 2001 From: armink Date: Wed, 12 Oct 2016 15:46:54 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E3=80=90=E5=AE=8C=E5=96=84=E3=80=91?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=BA=A2=E5=87=BA=E5=A4=84=E7=90=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: armink --- LICENSE | 2 +- easylogger/inc/elog.h | 2 +- easylogger/src/elog.c | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index 8d9bc06..c431db6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Armink (armink.ztl@gmail.com) +Copyright (c) 2015-2016 Armink (armink.ztl@gmail.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/easylogger/inc/elog.h b/easylogger/inc/elog.h index 4d7c74a..f8f183f 100644 --- a/easylogger/inc/elog.h +++ b/easylogger/inc/elog.h @@ -74,7 +74,7 @@ extern "C" { #define ELOG_LVL_TOTAL_NUM 6 /* EasyLogger software version number */ -#define ELOG_SW_VERSION "1.05.13" +#define ELOG_SW_VERSION "1.10.12" /* EasyLogger assert for developer. */ #ifdef ELOG_ASSERT_ENABLE diff --git a/easylogger/src/elog.c b/easylogger/src/elog.c index d8e7406..dccdf98 100644 --- a/easylogger/src/elog.c +++ b/easylogger/src/elog.c @@ -1,7 +1,7 @@ /* * This file is part of the EasyLogger Library. * - * Copyright (c) 2015, Armink, + * Copyright (c) 2015-2016, Armink, * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -329,8 +329,9 @@ void elog_output(uint8_t level, const char *tag, const char *file, const char *f log_len += elog_strcpy(log_len, log_buf + log_len, ELOG_NEWLINE_SIGN); } else { + log_len = ELOG_BUF_SIZE; /* copy newline sign */ - strcpy(log_buf - newline_len, ELOG_NEWLINE_SIGN); + strcpy(log_buf + ELOG_BUF_SIZE - newline_len, ELOG_NEWLINE_SIGN); } /* output log */