diff options
| author | Bernard Xiong <[email protected]> | 2019-01-03 20:15:26 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-01-03 20:15:26 +0800 |
| commit | 99575c43114f144348c6caee61d2dfb66ca9b683 (patch) | |
| tree | 256dbe8e710f7750dc3185f1b4f67a2d36a020fa /components | |
| parent | 9f31d1992697f21a2dc7588d0c74ec9941ce9791 (diff) | |
| parent | c7daacc96fa384f0852b8cd12477f60ff12a7f28 (diff) | |
Merge pull request #2151 from armink/fix_ulog_strcpy
[component][ulog] Fix the ulog_strcpy function.
Diffstat (limited to 'components')
| -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++; } |
