Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Modify to_[u]int64, to_double to eval entire string #148
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Sep 21, 2017
1 parent 38c6554 commit 96fdae9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libraries/fc/src/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace fc {
{
try
{
return boost::lexical_cast<int64_t>(i.c_str());
return boost::lexical_cast<int64_t>(i.c_str(), i.size());
}
catch( const boost::bad_lexical_cast& e )
{
Expand All @@ -106,7 +106,7 @@ namespace fc {
{ try {
try
{
return boost::lexical_cast<uint64_t>(i.c_str());
return boost::lexical_cast<uint64_t>(i.c_str(), i.size());
}
catch( const boost::bad_lexical_cast& e )
{
Expand All @@ -119,7 +119,7 @@ namespace fc {
{
try
{
return boost::lexical_cast<double>(i.c_str());
return boost::lexical_cast<double>(i.c_str(), i.size());
}
catch( const boost::bad_lexical_cast& e )
{
Expand Down

0 comments on commit 96fdae9

Please sign in to comment.