Recursively add offsets of Struct.field_from_path()

This commit is contained in:
Sybren A. Stüvel
2018-02-23 12:24:50 +01:00
parent 480b82337e
commit 8d32ab513f
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ class StructTest(unittest.TestCase):
self.assertEqual(self.s.field_from_path(psize, b'path'),
(self.f_path, 16))
self.assertEqual(self.s.field_from_path(psize, (b'prev', b'path')),
(self.f_path, 16))
(self.f_path, 24))
self.assertEqual(self.s.field_from_path(psize, (b'ptr', 2)),
(self.f_pointer, 16 + 4096 + 2 * psize))
self.assertEqual(self.s.field_from_path(psize, (b'floaty', 1)),