From 05265c3213d90f3bafdd2127c65fa268fcaa989a Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 1 Sep 2006 22:09:03 +0000 Subject: [PATCH] - Version bump to 2.1.5. - Fixed: P_LoadSegs() checked for invalid vertices too late. SVN r320 (trunk) --- docs/rh-log.txt | 4 ++++ src/p_setup.cpp | 20 ++++++++++---------- src/version.h | 6 +++--- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 43a863a1b..4f428c4db 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,7 @@ +September 1, 2006 +- Version bump to 2.1.5. +- Fixed: P_LoadSegs() checked for invalid vertices too late. + August 31, 2006 - Changed: Starting a new game or reloading an old one reset the chasecam. - Removed the r: ACS print cast. You can do it yourself with s: and an array. diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 1ede3bac5..61d1ceafe 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -816,8 +816,16 @@ void P_LoadSegs (MapData * map) int side, linedef; line_t *ldef; - li->v1 = &vertexes[LittleShort(ml->v1)]; - li->v2 = &vertexes[LittleShort(ml->v2)]; + vnum1 = LittleShort(ml->v1); + vnum2 = LittleShort(ml->v2); + + if (vnum1 >= numvertexes || vnum2 >= numvertexes) + { + throw i * 4; + } + + li->v1 = &vertexes[vnum1]; + li->v2 = &vertexes[vnum2]; li->PartnerSeg = NULL; segangle = (WORD)LittleShort(ml->angle); @@ -856,14 +864,6 @@ void P_LoadSegs (MapData * map) dis = 0; delta_angle = (abs(ptp_angle-(segangle<<16))>>ANGLETOFINESHIFT)*360/FINEANGLES; - vnum1 = li->v1 - vertexes; - vnum2 = li->v2 - vertexes; - - if (vnum1 >= numvertexes || vnum2 >= numvertexes) - { - throw i * 4; - } - if (delta_angle != 0) { segangle >>= (ANGLETOFINESHIFT-16); diff --git a/src/version.h b/src/version.h index f240618c4..da765b0f9 100644 --- a/src/version.h +++ b/src/version.h @@ -40,13 +40,13 @@ /** Lots of different version numbers **/ -#define DOTVERSIONSTR_NOREV "2.1.4" +#define DOTVERSIONSTR_NOREV "2.1.5" // The version string the user actually sees. #define DOTVERSIONSTR DOTVERSIONSTR_NOREV " (r" SVN_REVISION_STRING ")" // The version as seen in the Windows resource -#define RC_FILEVERSION 2,1,4,SVN_REVISION_NUMBER +#define RC_FILEVERSION 2,1,5,SVN_REVISION_NUMBER #define RC_PRODUCTVERSION 2,1,0,0 #define RC_FILEVERSION2 DOTVERSIONSTR #define RC_PRODUCTVERSION2 "2.1" @@ -89,7 +89,7 @@ #endif // MINSAVEVER is the minimum level snapshot version that can be loaded. -#define MINSAVEVER 235 // Used by 2.1.2 +#define MINSAVEVER 235 // Used by 2.1.5 // The maximum length of one save game description for the menus. #define SAVESTRINGSIZE 24