Avoid subscripting empty string.

From-SVN: r68739
This commit is contained in:
Doug Gregor 2003-06-30 20:45:22 +00:00 committed by Doug Gregor
parent 7685a26d92
commit 5892c641b3
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-06-30 Doug Gregor <dgregor@apple.com>
* include/bits/locale_facets.tcc (money_get::do_get): Avoid
subscripting empty string.
2003-06-30 Phil Edwards <pme@gcc.gnu.org>
* testsuite/Makefile.am (check-am): Do not override.

View File

@ -1272,7 +1272,7 @@ namespace std
}
// Strip leading zeros.
while (__tmp_units[0] == __ctype.widen('0'))
while (!__tmp_units.empty() && __tmp_units[0] == __ctype.widen('0'))
__tmp_units.erase(__tmp_units.begin());
if (__sign.size() && __sign == __neg_sign)