diff --git a/playgmd/gmdls3m.c b/playgmd/gmdls3m.c index 88770cab..52b62ad9 100644 --- a/playgmd/gmdls3m.c +++ b/playgmd/gmdls3m.c @@ -100,9 +100,14 @@ OCP_INTERNAL int LoadS3M (struct cpifaceSessionAPI_t *cpifaceSession, struct gmd cpifaceSession->cpiDebug (cpifaceSession, "[GMD/S3M] Invalid signature\n"); return errFormSig; } - if ((hdr.orders>255)||(hdr.pats>=254)) + if (hdr.orders>255) { - cpifaceSession->cpiDebug (cpifaceSession, "[GMD/S3M] too many orders and/or patterns\n"); + cpifaceSession->cpiDebug (cpifaceSession, "[GMD/S3M] too many orders (0x%04x > 0x00ff)\n", hdr.orders); + return errFormStruc; + } + if (hdr.pats>=254) + { + cpifaceSession->cpiDebug (cpifaceSession, "[GMD/S3M] too many patterns (0x%04x >= 0x00fe)\n", hdr.pats); return errFormStruc; } diff --git a/playgmd/gmdplay.c b/playgmd/gmdplay.c index cffe0574..be189ccb 100644 --- a/playgmd/gmdplay.c +++ b/playgmd/gmdplay.c @@ -1647,13 +1647,9 @@ OCP_INTERNAL int mpPlayModule (const struct gmdmodule *m, struct ocpfilehandle_t OCP_INTERNAL void mpStopModule (struct cpifaceSessionAPI_t *cpifaceSession) { - int i; - for (i=0; imcpSet (cpifaceSession, i, mcpCReset, 0); - } cpifaceSession->mcpDevAPI->ClosePlayer (cpifaceSession); free(que); + que=0; } OCP_INTERNAL void mpGetChanInfo (uint8_t ch, struct chaninfo *ci)