Skip to content

[PLX] Coverity reported that fmregs was one byte too small and some attributes that could be used without being initialized.#238

Merged
dynamite1981 merged 1 commit into
adplug:masterfrom
mywave82:plx-fixup
Dec 25, 2024
Merged

Conversation

@mywave82

@mywave82 mywave82 commented Dec 25, 2024

Copy link
Copy Markdown
Contributor

Also improved formatting of opl2_init_regs[] definition.

Avoid possible division by zero in getrefresh()

…ttributes that could be used without being initialized. Also improved formatting of opl2_init_regs[] definition.
@mywave82

mywave82 commented Dec 25, 2024

Copy link
Copy Markdown
Contributor Author

Regarding rewind():

Any entries in opl2_init_regs that are zero, will not be set during initialization calls to set_regs due to memset(fmchip, 0, sizeof(fmchip));

Perhaps setregs should had an alternative version that is write-through no matter what previously is stored in fmchip[], and remove the memset in rewind().

@dynamite1981 dynamite1981 merged commit e19d295 into adplug:master Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants