From fed221b28386185100fe9b70fd2fcede05c1c1c9 Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Fri, 31 Jul 2026 12:29:54 -0700 Subject: [PATCH] Guard against treating index 0 as a duplicate Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- tile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tile.cpp b/tile.cpp index 1b2789e0..a3d68487 100644 --- a/tile.cpp +++ b/tile.cpp @@ -1182,7 +1182,7 @@ static serial_feature next_feature(decompressor *geoms, std::atomic * sf = deserialize_feature(s, z, tx, ty, initial_x, initial_y); sf.stringpool = global_stringpool + pool_off[sf.segment]; - if (!next_feature_state.doing_deferrals && first_zoom && additional[A_DISTINGUISH_DUPLICATES] && sf.index == next_feature_state.previndex) { + if (!next_feature_state.doing_deferrals && *original_features > 0 && first_zoom && additional[A_DISTINGUISH_DUPLICATES] && sf.index == next_feature_state.previndex) { if (next_feature_state.which_deferral >= next_feature_state.deferrals.size()) { std::string tmpname = std::string(tmpdir) + std::string("/deferralXXXXXXXXXX"); int fd = mkstemp((char *) tmpname.c_str());