- Fixed: Trying to play a 0-length song from a wad inside a zip caused a crash.

SVN r181 (trunk)
This commit is contained in:
Randy Heit 2006-06-09 00:26:07 +00:00
parent 0c62f08a58
commit c808041337
7 changed files with 19 additions and 8 deletions

View file

@ -397,7 +397,7 @@ $(OBJDIR)/%.o : %.cpp
# This file needs special handling so that it actually gets compiled with SSE2 support. # This file needs special handling so that it actually gets compiled with SSE2 support.
$(OBJDIR)/nodebuild_classify_sse2.o: nodebuild_classify_sse2.cpp $(OBJDIR)/nodebuild_classify_sse2.o: nodebuild_classify_sse2.cpp
$(CCDV) $(CXX) $(CXXFLAGS) -msse2 -mfpmath=sse -c -o $@ $< $(CCDV) $(CXX) $(CXXFLAGS) -msse2 -mfpmath=sse -c -o $@ $<
$(OBJDIR)/%.o : %.nas $(OBJDIR)/%.o : %.nas
$(CCDV) nasmw -o $@ -f win32 $< $(CCDV) nasmw -o $@ -f win32 $<

View file

@ -1,3 +1,6 @@
June 8, 2006
- Fixed: Trying to play a 0-length song from a wad inside a zip caused a crash.
June 7, 2006 (Changes by Graf Zahl) June 7, 2006 (Changes by Graf Zahl)
- Fixed: A_CustomPunch didn't use the range parameter correctly. - Fixed: A_CustomPunch didn't use the range parameter correctly.

View file

@ -748,7 +748,6 @@ void FNodeBuilder::SplitSegs (DWORD set, node_t &node, DWORD splitseg, DWORD &ou
FPrivVert newvert; FPrivVert newvert;
unsigned int vertnum; unsigned int vertnum;
int seg2; int seg2;
unsigned int i;
if (seg->loopnum) if (seg->loopnum)
{ {

View file

@ -102,8 +102,8 @@ void FNodeBuilder::FindUsedVertices (vertex_t *oldverts, int max)
map[v2] = VertexMap->SelectVertexExact (newvert); map[v2] = VertexMap->SelectVertexExact (newvert);
} }
Level.Lines[i].v1 = (vertex_t *)map[v1]; Level.Lines[i].v1 = (vertex_t *)(size_t)map[v1];
Level.Lines[i].v2 = (vertex_t *)map[v2]; Level.Lines[i].v2 = (vertex_t *)(size_t)map[v2];
} }
} }

View file

@ -1148,8 +1148,10 @@ void R_DrawSkyBoxes ()
FirstInterestingDrawseg = InterestingDrawsegs.Size(); FirstInterestingDrawseg = InterestingDrawsegs.Size();
interestingStack.Push (FirstInterestingDrawseg); interestingStack.Push (FirstInterestingDrawseg);
drawsegStack.Push (firstdrawseg - drawsegs); ptrdiff_t diffnum = firstdrawseg - drawsegs;
visspriteStack.Push (firstvissprite - vissprites); drawsegStack.Push (diffnum);
diffnum = firstvissprite - vissprites;
visspriteStack.Push (diffnum);
viewxStack.Push (viewx); viewxStack.Push (viewx);
viewyStack.Push (viewy); viewyStack.Push (viewy);
viewzStack.Push (viewz); viewzStack.Push (viewz);

View file

@ -1539,7 +1539,8 @@ void R_StoreWallRange (int start, int stop)
if (rw_markmirror) if (rw_markmirror)
{ {
WallMirrors.Push (ds_p - drawsegs); size_t drawsegnum = ds_p - drawsegs;
WallMirrors.Push (drawsegnum);
ds_p->silhouette = SIL_BOTH; ds_p->silhouette = SIL_BOTH;
} }
else if (backsector == NULL) else if (backsector == NULL)
@ -1647,7 +1648,8 @@ void R_StoreWallRange (int start, int stop)
if (ds_p->bFogBoundary || ds_p->maskedtexturecol != -1) if (ds_p->bFogBoundary || ds_p->maskedtexturecol != -1)
{ {
InterestingDrawsegs.Push (ds_p - drawsegs); size_t drawsegnum = ds_p - drawsegs;
InterestingDrawsegs.Push (drawsegnum);
} }
} }
} }

View file

@ -1520,6 +1520,11 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
offset = -1; // this tells the low level code that the music offset = -1; // this tells the low level code that the music
// is being used from memory // is being used from memory
length = Wads.LumpLength (lumpnum); length = Wads.LumpLength (lumpnum);
if (length == 0)
{
offset = 0;
return false;
}
musiccache.Resize(length); musiccache.Resize(length);
Wads.ReadLump(lumpnum, &musiccache[0]); Wads.ReadLump(lumpnum, &musiccache[0]);
} }