[ipxe-devel] [resending] truncate menu title
Michael Brown
mbrown at fensystems.co.uk
Tue Jul 3 16:07:22 UTC 2012
On Tuesday 03 Jul 2012 16:58:14 Christian Hesse wrote:
> > > The attached one should be correct. We should not count the null byte.
> >
> > strlen() returns the length of a string excluding the terminating NUL.
>
> You are right... But sizeof() returns 81 (MENU_COLS + 1) in this case.
> So how about this?
snprintf() requires the size of the buffer (including space for the terminating
NUL), so sizeof(buf) is correct.
Michael
More information about the ipxe-devel
mailing list