system/corennnnn
Revision | 556d4addcb81066f763876ce8a1fc860850ff1aa (tree) |
---|---|
Zeit | 2016-09-08 03:52:56 |
Autor | Ameya Thakur <ameyat@code...> |
Commiter | Gerrit - the friendly Code Review server |
init: Fix for handling -p argument in the write command
We now correctly process the -p argument even if it is not the last
argument passed in to the function. The earlier iteration used to
incorrectly skip over it under some cases.
Change-Id: I842ce6f62a85b19a79bef4c082e132d1c9649485
@@ -822,8 +822,8 @@ static int do_write(const std::vector<std::string>& args) { | ||
822 | 822 | break; |
823 | 823 | } else { |
824 | 824 | //Value at current index is -p. The next index would |
825 | - //be the prefix.Skip beyond that. | |
826 | - i+=2; | |
825 | + //be the prefix.Skip it. | |
826 | + i++; | |
827 | 827 | } |
828 | 828 | } |
829 | 829 | if (!path || !value) { |