mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Change the positions to be 0-based, instead of 1-based.
This commit is contained in:
@@ -91,12 +91,12 @@ KeywordExt::init_selchars_low (bool use_all_chars, const Positions& positions, c
|
||||
if (i == Positions::LASTCHAR)
|
||||
/* Special notation for last KEY position, i.e. '$'. */
|
||||
c = static_cast<unsigned char>(_allchars[_allchars_length - 1]);
|
||||
else if (i <= _allchars_length)
|
||||
else if (i < _allchars_length)
|
||||
{
|
||||
/* Within range of KEY length, so we'll keep it. */
|
||||
c = static_cast<unsigned char>(_allchars[i - 1]);
|
||||
c = static_cast<unsigned char>(_allchars[i]);
|
||||
if (alpha_inc)
|
||||
c += alpha_inc[i - 1];
|
||||
c += alpha_inc[i];
|
||||
}
|
||||
else
|
||||
/* Out of range of KEY length, so we'll just skip it. */
|
||||
|
||||
Reference in New Issue
Block a user