fix two more stack overflows on win32 (in one case two 3.25mb entity_frame_t structs...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 11 Feb 2003 23:55:46 +0000 (23:55 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 11 Feb 2003 23:55:46 +0000 (23:55 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2734 d7cf8633-e32d-0410-b094-e92efae38249

protocol.c

index 4a66bfc..413db77 100644 (file)
@@ -144,10 +144,11 @@ void EntityFrame_AddFrame(entity_database_t *d, entity_frame_t *f)
 }
 
 // (server) writes a frame to network stream
+static entity_frame_t deltaframe; // FIXME?
 void EntityFrame_Write(entity_database_t *d, entity_frame_t *f, sizebuf_t *msg)
 {
        int i, onum, bits, number;
-       entity_frame_t deltaframe, *o = &deltaframe;
+       entity_frame_t *o = &deltaframe;
        entity_state_t *ent, *delta, baseline;
 
        EntityFrame_AddFrame(d, f);
@@ -318,10 +319,11 @@ void EntityFrame_Write(entity_database_t *d, entity_frame_t *f, sizebuf_t *msg)
 }
 
 // (client) reads a frame from network stream
+static entity_frame_t framedata; // FIXME?
 void EntityFrame_Read(entity_database_t *d)
 {
        int number, removed, bits;
-       entity_frame_t framedata, *f = &framedata, deltaframedata, *delta = &deltaframedata;
+       entity_frame_t *f = &framedata, *delta = &deltaframe;
        entity_state_t *e, baseline, *old, *oldend;
 
        ClearStateToDefault(&baseline);