Skip to content

Commit

Permalink
fix url parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Oct 14, 2024
1 parent 58c3b3e commit f7208d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/tiles/parse_tile_url.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ inline std::optional<geo::tile> parse_tile_url(std::string url) {
}

auto const [z_rev, y_rev, x_rev] =
utl::split<'/', utl::cstr, utl::cstr, utl::cstr>(url);
utl::split<'/', utl::cstr, utl::cstr, utl::cstr>(url.c_str() + 4);

for (auto const rev : {z_rev, y_rev, x_rev}) {
utl::verify(
rev.valid() &&
utl::all_of(rev, [](char const c) { return std::isdigit(c) != 0; }),
"invalid url");
"invalid url {}", url);
}

std::reverse(const_cast<char*>(x_rev.str),
Expand Down

0 comments on commit f7208d4

Please sign in to comment.