diff options
-rw-r--r-- | include/llvm/ADT/StringExtras.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h index 7e25f654d8..e6d1feac1a 100644 --- a/include/llvm/ADT/StringExtras.h +++ b/include/llvm/ADT/StringExtras.h @@ -100,7 +100,9 @@ static inline std::string itostr(int X) { static inline std::string ftostr(double V) { char Buffer[200]; sprintf(Buffer, "%20.6e", V); - return Buffer; + char *B = Buffer; + while (*B == ' ') ++B; + return B; } static inline std::string LowercaseString(const std::string &S) { |