From 90f4b9588dcc7f39d14f54689b34a80cea567240 Mon Sep 17 00:00:00 2001 From: dhoke4tdb <78012908+dhoke4tdb@users.noreply.github.com> Date: Tue, 2 Aug 2022 21:13:33 -0400 Subject: [PATCH] change stol() to stoul() for correct cross-platform issues with experimental version numbers (#3410) Change stol() to stoul() for correct cross-platform operations with experimental version numbers. TYPE: BUG DESC: use stoul() to correctly parse (32bit unsigned values) experimental version numbers cross-platform --- tiledb/storage_format/uri/parse_uri.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiledb/storage_format/uri/parse_uri.cc b/tiledb/storage_format/uri/parse_uri.cc index bdbe0d566b5..2bf77c0fb1c 100644 --- a/tiledb/storage_format/uri/parse_uri.cc +++ b/tiledb/storage_format/uri/parse_uri.cc @@ -88,7 +88,7 @@ Status get_fragment_name_version(const std::string& name, uint32_t* version) { // version is greater than or equal to 7, we have a footer version of 4. // Otherwise, it is version 3. const uint32_t frag_version = - std::stol(name.substr(name.find_last_of('_') + 1)); + std::stoul(name.substr(name.find_last_of('_') + 1)); if (frag_version >= 10) *version = 5; else if (frag_version >= 7)