aboutsummaryrefslogtreecommitdiffstats
path: root/icemulti
diff options
context:
space:
mode:
authorRoland Lutz <rlutz@hedmen.org>2017-07-11 18:30:56 +0200
committerRoland Lutz <rlutz@hedmen.org>2017-09-04 20:11:43 +0200
commit52387ef66c12861b04b0969ee09cdbd131e8fc97 (patch)
tree32054d6ca0153b89e93df3718f833ff0ce511b8c /icemulti
parent29cd829eb36cfe98b1fe149fb7db258db93d3878 (diff)
downloadicestorm-52387ef66c12861b04b0969ee09cdbd131e8fc97.tar.gz
icestorm-52387ef66c12861b04b0969ee09cdbd131e8fc97.tar.bz2
icestorm-52387ef66c12861b04b0969ee09cdbd131e8fc97.zip
icemulti: Populate headers early
Diffstat (limited to 'icemulti')
-rw-r--r--icemulti/icemulti.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/icemulti/icemulti.cc b/icemulti/icemulti.cc
index d9c6dae..21ddc04 100644
--- a/icemulti/icemulti.cc
+++ b/icemulti/icemulti.cc
@@ -248,7 +248,9 @@ int main(int argc, char **argv)
while (optind != argc) {
if (image_count >= NUM_IMAGES)
error("Too many images supplied\n");
- images[image_count++].reset(new Image(argv[optind++]));
+ images[image_count].reset(new Image(argv[optind++]));
+ header_images[image_count + 1] = &*images[image_count];
+ image_count++;
}
if (coldboot && por_image != 0)
@@ -269,8 +271,6 @@ int main(int argc, char **argv)
}
// Populate headers
- for (int i=0; i<image_count; i++)
- header_images[i + 1] = &*images[i];
header_images[0] = header_images[por_image + 1];
for (int i=image_count; i < NUM_IMAGES; i++)
header_images[i + 1] = header_images[0];