aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianjie Xu2017-03-23 17:12:22 -0500
committerTianjie Xu2017-03-23 17:12:22 -0500
commitbf607c4a2825b5577bb131450cfce8c183737770 (patch)
treed5bac6d3047fc70170c21be642f66e36cc239643 /edify/expr.cpp
parentb56a3c2e3afe1e9001e80358c66c66fe2775e42e (diff)
downloadplatform-bootable-recovery-bf607c4a2825b5577bb131450cfce8c183737770.tar.gz
platform-bootable-recovery-bf607c4a2825b5577bb131450cfce8c183737770.tar.xz
platform-bootable-recovery-bf607c4a2825b5577bb131450cfce8c183737770.zip
Don't fail ReadArgs if length to parse is 0
Test: recovery component tests pass Change-Id: I0946ba498d845ec552ae7e4c79dc94618b2fdf6d
Diffstat (limited to 'edify/expr.cpp')
-rw-r--r--edify/expr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/edify/expr.cpp b/edify/expr.cpp
index 2b7fd7a6..54ab3325 100644
--- a/edify/expr.cpp
+++ b/edify/expr.cpp
@@ -357,7 +357,7 @@ bool ReadArgs(State* state, const std::vector<std::unique_ptr<Expr>>& argv,
357 if (args == nullptr) { 357 if (args == nullptr) {
358 return false; 358 return false;
359 } 359 }
360 if (len == 0 || start + len > argv.size()) { 360 if (start + len > argv.size()) {
361 return false; 361 return false;
362 } 362 }
363 for (size_t i = start; i < start + len; ++i) { 363 for (size_t i = start; i < start + len; ++i) {