From 23d3a02226973f80188e84fa5dcedb14413c5b7f Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 24 Jun 2018 09:16:17 -0700 Subject: 4266 - space for alloc-id in heap allocations This has taken me almost 6 weeks :( --- 025compare.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '025compare.cc') diff --git a/025compare.cc b/025compare.cc index 92878208..e12fa1dc 100644 --- a/025compare.cc +++ b/025compare.cc @@ -32,6 +32,10 @@ case EQUAL: { vector& exemplar = ingredients.at(0); bool result = true; for (int i = /*skip exemplar*/1; i < SIZE(ingredients); ++i) { + if (SIZE(ingredients.at(i)) != SIZE(exemplar)) { + result = false; + break; + } if (!equal(ingredients.at(i).begin(), ingredients.at(i).end(), exemplar.begin())) { result = false; break; @@ -103,6 +107,10 @@ case NOT_EQUAL: { case NOT_EQUAL: { vector& exemplar = ingredients.at(0); products.resize(1); + if (SIZE(ingredients.at(1)) != SIZE(exemplar)) { + products.at(0).push_back(true); + break; + } bool equal_ingredients = equal(ingredients.at(1).begin(), ingredients.at(1).end(), exemplar.begin()); products.at(0).push_back(!equal_ingredients); break; -- cgit 1.4.1-2-gfad0