Fixed range error

[SVN r8827]
This commit is contained in:
John Maddock
2001-01-31 12:00:34 +00:00
parent 31c5b449bb
commit 47f5cc6fa1

View File

@ -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)