Fixed incorrect unsigned loop counter
commit57a09d8270a0aff1bbe36e9c28e83b9c160cd57b
authorMike Sharov <msharov@users.sourceforge.net>
Sat, 28 Jun 2008 21:48:50 +0000 (28 17:48 -0400)
committerMike Sharov <msharov@users.sourceforge.net>
Sat, 28 Jun 2008 21:48:50 +0000 (28 17:48 -0400)
treed7003e2d6fe5d113be3808b3a1e750597ef13bc6
parent32833a13849e5e9ccabacec1ce21c8dd6376e5a6
Fixed incorrect unsigned loop counter
Loop in string::rfind works only because size_type is the same size
as the pointer. When i is -1, it can be added to the pointer as
unsigned, wraps around, and produces the correct index. If size_type
were to change to a smaller type, this would stop working.
ustring.cc