Rockbox mail archiveSubject: Re: cvs: apps settings.c,1.67,1.68
Re: cvs: apps settings.c,1.67,1.68
From: Björn Stenberg <bjorn_at_haxx.se>
Date: Wed, 2 Oct 2002 20:04:10 +0200
Magnus Holmgren wrote:
> The code was cleaned up a lot, which is nice, but the visual feedback and
> error handling is gone
Yes. I removed that, since I think it should rather be handled in tree.c after the loading is completed.
> read_line was deliberately written to always null-terminate the buffer.
> That isn't the case any more, AFAICS, which could cause problems...
if ( count < buffer_size )
buffer[count] = 0;
It null terminates, unless the string was completely filled. This is standard behaviour, just like strncpy etc. However, I'm inclined to agree with you that this can cause problems, since users of read_line (such as myself ;) will likely forget to check this.
-- BjörnReceived on 2002-10-02
Page was last modified "Sat May 23 08:12:40 2020" The Rockbox Crew