about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-04-11 19:03:13 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-04-11 19:03:13 +0530
commit872de9c71f88c8e27a8eabc00b1a29d8b30ac552 (patch)
tree766fd249b394c2a1befc63b6da02e0e306ad9b23 /src/rustllvm/ExecutionEngineWrapper.cpp
parent1737957e193cc21da2cf8f73b1ab58fbff71cf31 (diff)
parentfaef52a847acc0dfe1e15117fe3201731209a95d (diff)
downloadrust-872de9c71f88c8e27a8eabc00b1a29d8b30ac552.tar.gz
rust-872de9c71f88c8e27a8eabc00b1a29d8b30ac552.zip
Rollup merge of #24269 - benashford:formatting-fix, r=alexcrichton
 This fixes the bug described in issue #23150.  This affected formatting any floating point number into a string in a formatting pattern that: a) required rounding up, and b) required an extra digit on the front.

So `format!(\"{:.0}\", 9.9)` would fail, but `format!(\"{:.0}\", 8.9)` would succeed.  This was due to a negative integer being cast to a `usize` resulting in an 'arithmetic operation overflowed' panic.

The fix was to change the order of operations so that the number is zero before casting.
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions