diff options
Diffstat (limited to 'cli_classic.c')
-rw-r--r-- | cli_classic.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cli_classic.c b/cli_classic.c index 0b0944f3..c72836fc 100644 --- a/cli_classic.c +++ b/cli_classic.c @@ -388,8 +388,9 @@ static int read_buf_from_include_args(const struct flashrom_layout *const layout while ((entry = layout_next_included(layout, entry))) { if (!entry->file) continue; - if (read_buf_from_file(buf + entry->start, - entry->end - entry->start + 1, entry->file)) + const struct flash_region *region = &entry->region; + if (read_buf_from_file(buf + region->start, + region->end - region->start + 1, entry->file)) return 1; } return 0; @@ -414,8 +415,9 @@ static int write_buf_to_include_args(const struct flashrom_layout *const layout, while ((entry = layout_next_included(layout, entry))) { if (!entry->file) continue; - if (write_buf_to_file(buf + entry->start, - entry->end - entry->start + 1, entry->file)) + const struct flash_region *region = &entry->region; + if (write_buf_to_file(buf + region->start, + region->end - region->start + 1, entry->file)) return 1; } |