Skip to content

Commit 4a511ec

Browse files
committed
fix: add flooring when double arguments passed in response
1 parent d4d436f commit 4a511ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ template <typename T> void split_response(const std::string& str, std::vector<T>
1515

1616
while (std::getline(ss, item, ',')) {
1717
try {
18-
vec.push_back(static_cast<T>(std::stoll(item)));
18+
vec.push_back(static_cast<T>(std::floor(std::stod(item))));
1919
} catch (const std::exception&) {
2020
throw std::runtime_error("Server call returned malformed response string: " + str);
2121
}

0 commit comments

Comments
 (0)