builtin functions: parser not traceback if func expands to empty string
Fixes the following:
[variables]
v=${f:f1:}
if 'f1' expands to empty string it doesn't traceback now.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
e8f42a2c3f
commit
94b7fdd41d
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ class Functions():
|
|||
self._esc = False
|
||||
|
||||
def _curr_char(self):
|
||||
return self._str[self._cnt]
|
||||
return self._str[self._cnt] if self._cnt < self._len else ""
|
||||
|
||||
def _curr_substr(self, _len):
|
||||
return self._str[self._cnt:self._cnt + _len]
|
||||
|
|
|
|||
Loading…
Reference in a new issue