summaryrefslogtreecommitdiffstats
path: root/lib/flash
diff options
context:
space:
mode:
authorSam Mendoza-Jonas <sam@mendozajonas.com>2016-03-05 10:20:33 +1100
committerSam Mendoza-Jonas <sam@mendozajonas.com>2016-03-05 10:27:27 +1100
commita6bb8cc856f43730ee04f2bae7d974551560a420 (patch)
tree8c184e0e09f5e7fc4b96aa92dd148d359ab855c1 /lib/flash
parent72928ed32ab3684be74e4a3b90329dee7cfa6bbb (diff)
downloadpetitboot-a6bb8cc856f43730ee04f2bae7d974551560a420.zip
petitboot-a6bb8cc856f43730ee04f2bae7d974551560a420.tar.gz
lib/flash: Fix version side being interpreted backwards
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'lib/flash')
-rw-r--r--lib/flash/flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/flash/flash.c b/lib/flash/flash.c
index 1056c63..b6188a0 100644
--- a/lib/flash/flash.c
+++ b/lib/flash/flash.c
@@ -163,7 +163,7 @@ int flash_parse_version(void *ctx, char ***versions, bool current)
if (!current && !info->other_side)
return 0;
- cur_info = current ? info->other_side : info;
+ cur_info = !current ? info->other_side : info;
len = cur_info->attr_data_len - ecc_size(cur_info->attr_data_len);
buffer = talloc_array(cur_info, char, len);
OpenPOWER on IntegriCloud