Skip to content

Commit

Permalink
Merge pull request boostorg#59 from aiche/fix/parse_nan_deref_end-#6955
Browse files Browse the repository at this point in the history
Check for first == last before dereferencing first
  • Loading branch information
djowel committed Oct 13, 2014
2 parents 00d36ae + 6046448 commit 7dba6cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/boost/spirit/home/qi/numeric/real_policies.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ namespace boost { namespace spirit { namespace qi
// nan[(...)] ?
if (detail::string_parse("nan", "NAN", first, last, unused))
{
if (*first == '(')
if (first != last && *first == '(')
{
// skip trailing (...) part
Iterator i = first;
Expand Down

0 comments on commit 7dba6cc

Please sign in to comment.