Skip to content

Commit

Permalink
change stol() to stoul() for correct cross-platform issues with exper…
Browse files Browse the repository at this point in the history
…imental 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
  • Loading branch information
dhoke4tdb committed Aug 3, 2022
1 parent bf465c3 commit 90f4b95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tiledb/storage_format/uri/parse_uri.cc
Expand Up @@ -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)
Expand Down

0 comments on commit 90f4b95

Please sign in to comment.