[ipxe-devel] [resending] truncate menu title

Michael Brown mbrown at fensystems.co.uk
Tue Jul 3 15:24:18 UTC 2012


On Tuesday 03 Jul 2012 15:29:36 Christian Hesse wrote:
> > > Applied, with some modifications:
> > >   http://git.ipxe.org/ipxe.git/commitdiff/b3adabd
> > > 
> > > Thanks, and sorry for the delay.
> > 
> > Sorry, but this does not work... MENU_COLS + 1 is too much, the string is
> > truncated but it is still not shown as it is one byte too long.
> > 
> > I would suggest the attached patch, this leaves a blank left and right of
> > the menu title.
> > This is like menu items behave, they always have a blank at the end as
> > well.
> 
> Stupid me... Please ignore my last patch.
> The attached one should be correct. We should not count the null byte.

strlen() returns the length of a string excluding the terminating NUL.

Michael



More information about the ipxe-devel mailing list