X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/e66ced89a433143539ae398bf21c1e74993db5fa..b23692f3038296c94d25c84c55ed4c1bb49619cf:/Library.cpp diff --git a/Library.cpp b/Library.cpp index 59decd8..7203225 100644 --- a/Library.cpp +++ b/Library.cpp @@ -172,6 +172,13 @@ void CYStringify(std::ostringstream &str, const char *data, size_t size) { } void CYNumerify(std::ostringstream &str, double value) { + if (std::isinf(value)) { + if (value < 0) + str << '-'; + str << "Infinity"; + return; + } + char string[32]; // XXX: I want this to print 1e3 rather than 1000 sprintf(string, "%.17g", value);