Fix arg parsing in citadel_updater
I forgot to advance optarg when opening the input file. Oops.
Change-Id: Ie2cee9a0d0e21e66f38b26cb2a9786e52caf2f70
Signed-off-by: Bill Richardson <wfrichar@google.com>
diff --git a/citadel/updater/updater.cpp b/citadel/updater/updater.cpp
index c2ee303..8c19f10 100644
--- a/citadel/updater/updater.cpp
+++ b/citadel/updater/updater.cpp
@@ -379,7 +379,6 @@
static uint32_t do_enable(AppClient &app, const char *pw)
{
-
std::vector<uint8_t> data(sizeof(struct nugget_app_enable_update));
struct nugget_app_enable_update *s =
(struct nugget_app_enable_update*)data.data();
@@ -577,7 +576,7 @@
if (options.ro || options.rw) {
if (optind < argc) {
/* Sets errorcnt on failure */
- image = read_image_from_file(argv[optind]);
+ image = read_image_from_file(argv[optind++]);
if (errorcnt)
goto out;
} else {