> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> But we should check the standard, and see if a '\0' teminated
Lars> string is required, and wat values of n is allowed.
You are right. The standard says nothing about the string being
0-terminated (or using traits to get the l
> I have anoter proposal: Since there is a n argument, we can expect
> this to be meeningful, so:
I think so, too.
> lyxstring::lyxstring(value_type const * s, size_type n)
> {
> Assert(s && n < npos); // STD!
> static Srep empty_rep(0, "");
> if (*s && n) { // s is not empty
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
| While running purify on lyx, I find plenty of uninitialized memory
| read coming from lyxstring constructor
| lyxstring::lyxstring(value_type const * s, size_type n)
|
| The problem is that the constructor uses at some place min(n, strlen(s))