Commit ccdf6a4
gh-152275: Initialize the optional attr argument to zero
The attr converter had no C default, so for methods where attr is an
optional argument (addch(), addstr(), insch(), ...) the generated code
left the attr_t variable uninitialized when the argument was omitted.
A garbage value was then applied as character attributes, corrupting the
output on platforms where the stack did not happen to be zero. Give the
converter a default of 0, as the previous long converter had.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 7dd5e94 commit ccdf6a4
2 files changed
Lines changed: 20 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
| 934 | + | |
934 | 935 | | |
935 | | - | |
| 936 | + | |
936 | 937 | | |
937 | 938 | | |
938 | 939 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments