Skip to content

Commit 8e500ad

Browse files
authored
Row offset calculation error fixed (#351)
1 parent c451405 commit 8e500ad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

snap7/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,10 +1000,11 @@ def make_rows(self):
10001000
row_size = self.row_size
10011001
specification = self.specification
10021002
layout_offset = self.layout_offset
1003+
row_offset = self.row_offset
10031004

10041005
for i in range(self.size):
10051006
# calculate where row in bytearray starts
1006-
db_offset = i * row_size + self.db_offset
1007+
db_offset = i * (row_size + row_offset) + self.db_offset
10071008
# create a row object
10081009
row = DB_Row(self,
10091010
specification,

0 commit comments

Comments
 (0)