From 765ff5dcb569abdc147d3cb13ef29bdedc842c8f Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sat, 30 Jun 2018 22:43:55 +0300 Subject: Fix crash on Windows with out_of_range exception & update docs --- include/Cache.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/Cache.h') diff --git a/include/Cache.h b/include/Cache.h index 5d65c80c..14f991e8 100644 --- a/include/Cache.h +++ b/include/Cache.h @@ -48,11 +48,11 @@ struct SearchResult QString display_name; }; -inline int +static int numeric_key_comparison(const MDB_val *a, const MDB_val *b) { - auto lhs = std::stoul(std::string((char *)a->mv_data, a->mv_size)); - auto rhs = std::stoul(std::string((char *)b->mv_data, b->mv_size)); + auto lhs = std::stoull(std::string((char *)a->mv_data, a->mv_size)); + auto rhs = std::stoull(std::string((char *)b->mv_data, b->mv_size)); if (lhs < rhs) return 1; -- cgit 1.5.1