Skip to content

Commit c6a9340

Browse files
Update bundle_serializer.cc
1 parent 759187f commit c6a9340

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Firestore/core/src/bundle/bundle_serializer.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,13 +526,13 @@ BundledQuery BundleSerializer::DecodeBundledQuery(
526526

527527
auto start_at_bound = DecodeBound(reader, structured_query, "startAt");
528528
std::shared_ptr<Bound> start_at;
529-
if (start_at_bound.position().values_count) {
529+
if (start_at_bound.position().values_count > 0) {
530530
start_at = std::make_shared<Bound>(std::move(start_at_bound));
531531
}
532532

533533
auto end_at_bound = DecodeBound(reader, structured_query, "endAt");
534534
std::shared_ptr<Bound> end_at;
535-
if (end_at_bound.position().values_count) {
535+
if (end_at_bound.position().values_count > 0) {
536536
end_at = std::make_shared<Bound>(std::move(end_at_bound));
537537
}
538538

@@ -639,7 +639,7 @@ Bound BundleSerializer::DecodeBound(JsonReader& reader,
639639
std::vector<json> values = reader.RequiredArray("values", bound_json);
640640
bool before = reader.OptionalBool("before", bound_json);
641641

642-
google_firestore_v1_ArrayValue positions;
642+
google_firestore_v1_ArrayValue positions{};
643643
SetRepeatedField(&positions.values, &positions.values_count, values,
644644
[&](const json& j) { return DecodeValue(reader, j); });
645645
return Bound(positions, before);

0 commit comments

Comments
 (0)