mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +00:00
tostr and lyxstring::find fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@264 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f88f9c8092
commit
25e9d75386
@ -1,3 +1,11 @@
|
||||
1999-10-28 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* src/support/lstrings.C (tostr(char)): fix it to handle param as
|
||||
a character not as a small integer.
|
||||
|
||||
* src/support/lyxstring.C (find): removed Assert and added i >=
|
||||
rep->sz to the first if.
|
||||
|
||||
1999-10-27 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* src/LyXAction.C (LookupFunc): added a workaround for sun
|
||||
|
@ -86,7 +86,7 @@ string tostr(unsigned int ui)
|
||||
|
||||
string tostr(char c)
|
||||
{
|
||||
return tostr(long(c));
|
||||
return string(1, c);
|
||||
}
|
||||
|
||||
string tostr(bool b)
|
||||
|
@ -864,9 +864,8 @@ void lyxstring::insert(iterator p, iterator first, iterator last)
|
||||
|
||||
lyxstring::size_type lyxstring::find(lyxstring const & a, size_type i) const
|
||||
{
|
||||
if (!rep->sz) return npos;
|
||||
if (!rep->sz || i >= rep->sz) return npos;
|
||||
|
||||
Assert(i < rep->sz);
|
||||
TestlyxstringInvariant(this);
|
||||
|
||||
for (size_type t = i; rep->sz - t >= a.length(); ++t) {
|
||||
|
Loading…
Reference in New Issue
Block a user