forked from boostorg/regex
Fixed range error
[SVN r8827]
This commit is contained in:
@ -36,7 +36,7 @@ template <class S, class charT>
|
|||||||
unsigned count_chars(const S& s, charT c)
|
unsigned count_chars(const S& s, charT c)
|
||||||
{
|
{
|
||||||
unsigned int count = 0;
|
unsigned int count = 0;
|
||||||
for(unsigned pos = 0; pos <= s.size(); ++pos)
|
for(unsigned pos = 0; pos < s.size(); ++pos)
|
||||||
{
|
{
|
||||||
if(s[pos] == c) ++count;
|
if(s[pos] == c) ++count;
|
||||||
}
|
}
|
||||||
@ -116,3 +116,4 @@ unsigned find_sort_syntax(const traits* pt, charT* delim)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user