diff options
| author | 朱天龙 (Armink) <[email protected]> | 2019-01-03 15:31:04 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-01-03 15:31:04 +0800 |
| commit | c7daacc96fa384f0852b8cd12477f60ff12a7f28 (patch) | |
| tree | 67dfe140d82b701b13bf0dbfdd564f5797c01793 | |
| parent | 5cd3815058062182aa894dcb6c77b0ed1a4f4a18 (diff) | |
[component][ulog] Fix the ulog_strcpy function.
| -rw-r--r-- | components/utilities/ulog/ulog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/utilities/ulog/ulog.c b/components/utilities/ulog/ulog.c index 186154c7c9..b813678ecd 100644 --- a/components/utilities/ulog/ulog.c +++ b/components/utilities/ulog/ulog.c @@ -149,7 +149,7 @@ size_t ulog_strcpy(size_t cur_len, char *dst, const char *src) while (*src != 0) { /* make sure destination has enough space */ - if (cur_len++ <= ULOG_LINE_BUF_SIZE) + if (cur_len++ < ULOG_LINE_BUF_SIZE) { *dst++ = *src++; } |
