Fix off-by-one
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19626 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4c793febc8
commit
b6eaf1db1b
1 changed files with 3 additions and 3 deletions
|
@ -145,12 +145,12 @@ void _logf(const char *format, ...)
|
|||
while(len > MAX_LOGF_ENTRY)
|
||||
{
|
||||
ptr = logfbuffer[logfindex];
|
||||
strncpy(ptr, buf + tlen, MAX_LOGF_ENTRY);
|
||||
strncpy(ptr, buf + tlen, MAX_LOGF_ENTRY-1);
|
||||
ptr[MAX_LOGF_ENTRY] = LOGF_TERMINATE_CONTINUE_LINE;
|
||||
logfindex++;
|
||||
check_logfindex();
|
||||
len -= MAX_LOGF_ENTRY;
|
||||
tlen += MAX_LOGF_ENTRY;
|
||||
len -= MAX_LOGF_ENTRY-1;
|
||||
tlen += MAX_LOGF_ENTRY-1;
|
||||
multiline = true;
|
||||
}
|
||||
ptr = logfbuffer[logfindex];
|
||||
|
|
Loading…
Reference in a new issue