]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[cmdline] Fix multi-layer variable expansion
authorMichael Brown <mcb30@ipxe.org>
Mon, 22 Nov 2010 21:31:00 +0000 (21:31 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 22 Nov 2010 21:34:35 +0000 (21:34 +0000)
commitc1327e43ab4c9281651e8505a2149a96c11371b4
tree9aba6931e639102dd580d198ea4047790a15400d
parenta180c7526caeb849d04d5f83ac55226920d26b54
[cmdline] Fix multi-layer variable expansion

Expansion of ${${foo}} will currently fail, because the first
opening "${" will be incorrectly matched against the first closing
"}", leading to an attempt to expand the variable "${foo".

Fix by ensuring that the most recent opening "${" is used to match
against the first closing "}".

Total cost: 8 bytes.  :)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/exec.c