Merge pull request #2151 from armink/fix_ulog_strcpy

[component][ulog] Fix the ulog_strcpy function.
This commit is contained in:
Bernard Xiong 2019-01-03 20:15:26 +08:00 committed by GitHub
commit 99575c4311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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++;
}