Skip to content
Commit 7dfcf2a5 authored by Marek Vasut's avatar Marek Vasut Committed by Simon Glass
Browse files

cmd: fdt: Fix iteration over elements above index 1 in fdt get



Always increment both the iterator and pointer into the string
property value by length of the current element + 1 (to cater
for the string delimiter), otherwise the element extracted from
the string property value would be extracted from an offset that
is multiple of the length of the first element, instead of sum
of element lengths until select index.

This fixes 'fdt get value' operation for index above 1 (counting
from index 0).

Acked-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fixes: 13982ced ("cmd: fdt: Add support for reading stringlist property values")
Signed-off-by: default avatarMarek Vasut <marex@denx.de>
parent 0524bfc2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment