mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
- Fix more errors found with static code analysis.
SVN r3288 (trunk)
This commit is contained in:
parent
f8bc459a21
commit
7714ee3ffd
5 changed files with 388 additions and 385 deletions
|
@ -316,7 +316,7 @@ bool FScriptLoader::ParseInfo(MapData * map)
|
|||
}
|
||||
|
||||
|
||||
delete lump;
|
||||
delete[] lump;
|
||||
return HasScripts;
|
||||
}
|
||||
|
||||
|
|
|
@ -1234,7 +1234,7 @@ static bool CheckCachedNodes(MapData *map)
|
|||
BYTE md5[16];
|
||||
BYTE md5map[16];
|
||||
DWORD numlin;
|
||||
DWORD *verts;
|
||||
DWORD *verts = NULL;
|
||||
|
||||
FString path = CreateCacheName(map, false);
|
||||
FILE *f = fopen(path, "rb");
|
||||
|
@ -1298,6 +1298,10 @@ static bool CheckCachedNodes(MapData *map)
|
|||
return true;
|
||||
|
||||
errorout:
|
||||
if (verts != NULL)
|
||||
{
|
||||
delete[] verts;
|
||||
}
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -3098,7 +3098,6 @@ static void P_GroupLines (bool buildmap)
|
|||
// set the soundorg to the middle of the bounding box
|
||||
sector->soundorg[0] = bbox.Right()/2 + bbox.Left()/2;
|
||||
sector->soundorg[1] = bbox.Top()/2 + bbox.Bottom()/2;
|
||||
sector->soundorg[2] = sector->floorplane.ZatPoint (sector->soundorg[0], sector->soundorg[1]);
|
||||
}
|
||||
delete[] linesDoneInEachSector;
|
||||
times[3].Unclock();
|
||||
|
|
|
@ -445,7 +445,7 @@ bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle,
|
|||
Printf ("EV_RotatePoly: Invalid polyobj num: %d\n", polyNum);
|
||||
break;
|
||||
}
|
||||
if (poly && poly->specialdata && !overRide)
|
||||
if (poly->specialdata && !overRide)
|
||||
{ // mirroring poly is already in motion
|
||||
break;
|
||||
}
|
||||
|
@ -555,8 +555,8 @@ bool EV_MovePoly (line_t *line, int polyNum, int speed, angle_t angle,
|
|||
while ( (mirror = poly->GetMirror()) )
|
||||
{
|
||||
poly = PO_GetPolyobj(mirror);
|
||||
if (poly && poly->specialdata && !overRide)
|
||||
{ // mirroring poly is already in motion
|
||||
if (poly == NULL || (poly->specialdata != NULL && !overRide))
|
||||
{ // mirroring poly does not exist or is already in motion
|
||||
break;
|
||||
}
|
||||
pe = new DMovePoly (mirror);
|
||||
|
@ -655,8 +655,8 @@ bool EV_MovePolyTo(line_t *line, int polyNum, int speed, fixed_t targx, fixed_t
|
|||
while ( (mirror = poly->GetMirror()) )
|
||||
{
|
||||
poly = PO_GetPolyobj(mirror);
|
||||
if (poly && poly->specialdata && !overRide)
|
||||
{ // mirroring poly is already in motion
|
||||
if (poly == NULL || (poly->specialdata != NULL && !overRide))
|
||||
{ // mirroring poly does not exist or is already in motion
|
||||
break;
|
||||
}
|
||||
// reverse the direction
|
||||
|
@ -841,8 +841,8 @@ bool EV_OpenPolyDoor (line_t *line, int polyNum, int speed, angle_t angle,
|
|||
while ( (mirror = poly->GetMirror()) )
|
||||
{
|
||||
poly = PO_GetPolyobj (mirror);
|
||||
if (poly && poly->specialdata)
|
||||
{ // mirroring poly is already in motion
|
||||
if (poly == NULL || poly->specialdata != NULL)
|
||||
{ // mirroring poly does not exist or is already in motion
|
||||
break;
|
||||
}
|
||||
pd = new DPolyDoor (mirror, type);
|
||||
|
|
750
zdoom.vcproj
750
zdoom.vcproj
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue