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
_______________________________________________
ipxe-devel mailing list
[email protected]
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

Reply via email to