From 8cfffe309c18cb5c516d9c5718195d20afa07dc0 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Thu, 10 Oct 2013 11:26:13 +0100 Subject: [PATCH] [caching/hint_array] resize the destination before unpacking a hint --- caching/hint_array.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/caching/hint_array.cc b/caching/hint_array.cc index cb7b2bf..315ed42 100644 --- a/caching/hint_array.cc +++ b/caching/hint_array.cc @@ -17,6 +17,7 @@ namespace { // FIXME: slow copying for now static void unpack(disk_type const &disk, value_type &value) { + value.resize(WIDTH); for (unsigned byte = 0; byte < WIDTH; byte++) value.at(byte) = disk[byte]; }