Skip to content

Commit

Permalink
test proposed recompiler fix for null-pointer-subtraction error
Browse files Browse the repository at this point in the history
  • Loading branch information
nitzmahone committed May 23, 2024
1 parent 77756b7 commit 665cb65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cffi/recompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ def _struct_ctx(self, tp, cname, approxname, named_ptr=None):
if cname is None or fbitsize >= 0:
offset = '(size_t)-1'
elif named_ptr is not None:
offset = '((char *)&((%s)0)->%s) - (char *)0' % (
offset = '((char *)&((%s)4096)->%s) - (char *)4096' % (
named_ptr.name, fldname)
else:
offset = 'offsetof(%s, %s)' % (tp.get_c_name(''), fldname)
Expand Down

0 comments on commit 665cb65

Please sign in to comment.