Commit fab02f84 authored by Sebastien Bourdeauducq's avatar Sebastien Bourdeauducq
Browse files

fhdl: fix implicit slice index

parent 82f77180
......@@ -72,6 +72,8 @@ class Value:
elif isinstance(key, slice):
start = key.start or 0
stop = key.stop or self.bv.width
if stop > self.bv.width:
stop = self.bv.width
if key.step != None:
raise KeyError
return Slice(self, start, stop)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment