On line 366 and following:
case ControlCmd: /* Read a control command */
channel = (dwParam1 >> 8) & 0xFF;
value = (dwParam1 >> 16) & 0xFF;
port->cache.sqControllers[channel] = value;
channel may reach a value of 255 (0xFF).
but the cache is dimensionned 128 near line 142:
/***************************************************************
* Controller value caches -- This is the minimum complement
* A "larger" driver would cache 128*16 controllers and 128*16 key pressures
*/
typedef struct sqControllerCache {
unsigned char sqControllers[128]; /* Controller value table */
unsigned char sqKeyPressures[128]; /* Polyphonic key pressure table */
unsigned char sqChanPressures[16]; /* Channel pressure value table */
int sqPitchBend[16]; /* The value of the pitch wheel */
} sqControllerCache;
Maybe use & 0x7F to be sure?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Potential buffer overrun in sqwin32midi.c (IntelliSense C6386) (#336)"}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/336"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/336",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/336",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>