Skip to content

Commit

Permalink
fix parse int still working with > 1 decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
gskapka authored and D-Nice committed Dec 3, 2018
1 parent 31f5fe3 commit 74ac5ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oraclizeAPI_0.5.sol
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,8 @@ contract usingOraclize {
mint *= 10;
mint += uint(uint8(bresult[i])) - 48;
} else if (uint(uint8(bresult[i])) == 46) {
decimals = true;
require(!decimals, 'More than one decimal encountered in string!');
decimals = true;
} else {
revert("Non-numeral character encountered in string!");
}
Expand Down

0 comments on commit 74ac5ad

Please sign in to comment.