comparison Plugins/Input/adplug/core/fmopl.c @ 1376:c71e2ef2dcf4 trunk

[svn] Security fixes from AdPlug CVS (their July 7 commit shortly before the secunia announcement).
author chainsaw
date Sat, 08 Jul 2006 08:29:18 -0700
parents 0a73d1faeb4e
children f12d7e208b43
comparison
equal deleted inserted replaced
1375:d2c411305bf8 1376:c71e2ef2dcf4
753 /* ---------- write a OPL registers ---------- */ 753 /* ---------- write a OPL registers ---------- */
754 static void OPLWriteReg(FM_OPL *OPL, int r, int v) 754 static void OPLWriteReg(FM_OPL *OPL, int r, int v)
755 { 755 {
756 OPL_CH *CH; 756 OPL_CH *CH;
757 int slot; 757 int slot;
758 size_t block_fnum; 758 int block_fnum;
759 759
760 switch(r&0xe0) 760 switch(r&0xe0)
761 { 761 {
762 case 0x00: /* 00-1f:controll */ 762 case 0x00: /* 00-1f:controll */
763 switch(r&0x1f) 763 switch(r&0x1f)
1341 case 0x05: /* KeyBoard IN */ 1341 case 0x05: /* KeyBoard IN */
1342 if(OPL->type&OPL_TYPE_KEYBOARD) 1342 if(OPL->type&OPL_TYPE_KEYBOARD)
1343 { 1343 {
1344 if(OPL->keyboardhandler_r) 1344 if(OPL->keyboardhandler_r)
1345 return OPL->keyboardhandler_r(OPL->keyboard_param); 1345 return OPL->keyboardhandler_r(OPL->keyboard_param);
1346 else { 1346 else
1347 LOG(LOG_WAR,("OPL:read unmapped KEYBOARD port\n")); 1347 LOG(LOG_WAR,("OPL:read unmapped KEYBOARD port\n"));
1348 return 0; /* Avoid warning about empty else clause */
1349 }
1350 } 1348 }
1351 return 0; 1349 return 0;
1352 #if 0 1350 #if 0
1353 case 0x0f: /* ADPCM-DATA */ 1351 case 0x0f: /* ADPCM-DATA */
1354 return 0; 1352 return 0;
1356 case 0x19: /* I/O DATA */ 1354 case 0x19: /* I/O DATA */
1357 if(OPL->type&OPL_TYPE_IO) 1355 if(OPL->type&OPL_TYPE_IO)
1358 { 1356 {
1359 if(OPL->porthandler_r) 1357 if(OPL->porthandler_r)
1360 return OPL->porthandler_r(OPL->port_param); 1358 return OPL->porthandler_r(OPL->port_param);
1361 else { 1359 else
1362 LOG(LOG_WAR,("OPL:read unmapped I/O port\n")); 1360 LOG(LOG_WAR,("OPL:read unmapped I/O port\n"));
1363 return 0; /* Avoid warning about empty else clause */
1364 }
1365 } 1361 }
1366 return 0; 1362 return 0;
1367 case 0x1a: /* PCM-DATA */ 1363 case 0x1a: /* PCM-DATA */
1368 return 0; 1364 return 0;
1369 } 1365 }