mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
fix off-by-one error (bug 1682)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9216 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7f4c86a075
commit
a899dc13c9
@ -1,3 +1,7 @@
|
||||
2004-11-09 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* lengthcommon.C (unitFromString): fix off-by-one error (bug 1682)
|
||||
|
||||
2004-11-05 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* lyxfunc.C (dispatch): remove the verbose argument
|
||||
|
@ -61,7 +61,7 @@ char const * const unit_name_gui[] = {
|
||||
LyXLength::UNIT unitFromString(string const & data)
|
||||
{
|
||||
int i = 0;
|
||||
while (i < num_units && data != unit_name[i])
|
||||
while (i < num_units - 1 && data != unit_name[i])
|
||||
++i;
|
||||
return static_cast<LyXLength::UNIT>(i);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user