summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Haley2010-09-10 01:53:57 +0000
committerJames Haley2010-09-10 01:53:57 +0000
commit9f4c5a6ed4e490fb51aa207c2def75fcb2622584 (patch)
tree3f12bb085abcd77e071091bcd431e6c376288397 /src
parent120d90c67b2a4aa0a8883c4897241dee2222acd2 (diff)
downloadchocolate-doom-9f4c5a6ed4e490fb51aa207c2def75fcb2622584.tar.gz
chocolate-doom-9f4c5a6ed4e490fb51aa207c2def75fcb2622584.tar.bz2
chocolate-doom-9f4c5a6ed4e490fb51aa207c2def75fcb2622584.zip
Post-merge fixes: Created project for OPL library. Fixed OPL library to
not use GNU C-isms such as inline keyword, declaration/statement mixing, and strange calling convention syntax for import function pointers. Fixed critical buffer overflow in M_BindChatControls - should be back-merged immediately. Added autogenerated directories *back* to ignore list. Subversion-branch: /branches/strife-branch Subversion-revision: 2052
Diffstat (limited to 'src')
-rw-r--r--src/m_controls.c2
-rw-r--r--src/midifile.c10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/m_controls.c b/src/m_controls.c
index 8b8af160..a9beed46 100644
--- a/src/m_controls.c
+++ b/src/m_controls.c
@@ -355,7 +355,7 @@ void M_BindMenuControls(void)
void M_BindChatControls(unsigned int num_players)
{
- char name[20];
+ char name[32]; // haleyjd: 20 not large enough - Thank you, come again!
int i;
M_BindVariable("key_multi_msg", &key_multi_msg);
diff --git a/src/midifile.c b/src/midifile.c
index 1990dcdc..e9af051c 100644
--- a/src/midifile.c
+++ b/src/midifile.c
@@ -36,6 +36,11 @@
#define TRACK_CHUNK_ID "MTrk"
#define MAX_BUFFER_SIZE 0x10000
+// haleyjd 09/09/10: packing required
+#ifdef _MSC_VER
+#pragma pack(push, 1)
+#endif
+
typedef struct
{
byte chunk_id[4];
@@ -50,6 +55,11 @@ typedef struct
unsigned short time_division;
} PACKEDATTR midi_header_t;
+// haleyjd 09/09/10: packing off.
+#ifdef _MSC_VER
+#pragma pack(pop)
+#endif
+
typedef struct
{
// Length in bytes: