diff --git a/Makefile.mingw b/Makefile.mingw index 181f757541..ba34e25c05 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -397,7 +397,7 @@ $(OBJDIR)/%.o : %.cpp # This file needs special handling so that it actually gets compiled with SSE2 support. $(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 $(CCDV) nasmw -o $@ -f win32 $< diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 452fabfda8..1ecff027ab 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -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) - Fixed: A_CustomPunch didn't use the range parameter correctly. diff --git a/src/nodebuild.cpp b/src/nodebuild.cpp index e9d76cc9b1..f149963e25 100644 --- a/src/nodebuild.cpp +++ b/src/nodebuild.cpp @@ -748,7 +748,6 @@ void FNodeBuilder::SplitSegs (DWORD set, node_t &node, DWORD splitseg, DWORD &ou FPrivVert newvert; unsigned int vertnum; int seg2; - unsigned int i; if (seg->loopnum) { diff --git a/src/nodebuild_utility.cpp b/src/nodebuild_utility.cpp index 528f593490..c49117b375 100644 --- a/src/nodebuild_utility.cpp +++ b/src/nodebuild_utility.cpp @@ -102,8 +102,8 @@ void FNodeBuilder::FindUsedVertices (vertex_t *oldverts, int max) map[v2] = VertexMap->SelectVertexExact (newvert); } - Level.Lines[i].v1 = (vertex_t *)map[v1]; - Level.Lines[i].v2 = (vertex_t *)map[v2]; + Level.Lines[i].v1 = (vertex_t *)(size_t)map[v1]; + Level.Lines[i].v2 = (vertex_t *)(size_t)map[v2]; } } diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 57cf520a72..655b0fdcd4 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -1148,8 +1148,10 @@ void R_DrawSkyBoxes () FirstInterestingDrawseg = InterestingDrawsegs.Size(); interestingStack.Push (FirstInterestingDrawseg); - drawsegStack.Push (firstdrawseg - drawsegs); - visspriteStack.Push (firstvissprite - vissprites); + ptrdiff_t diffnum = firstdrawseg - drawsegs; + drawsegStack.Push (diffnum); + diffnum = firstvissprite - vissprites; + visspriteStack.Push (diffnum); viewxStack.Push (viewx); viewyStack.Push (viewy); viewzStack.Push (viewz); diff --git a/src/r_segs.cpp b/src/r_segs.cpp index f4e21fbf42..1475ea5a58 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -1539,7 +1539,8 @@ void R_StoreWallRange (int start, int stop) if (rw_markmirror) { - WallMirrors.Push (ds_p - drawsegs); + size_t drawsegnum = ds_p - drawsegs; + WallMirrors.Push (drawsegnum); ds_p->silhouette = SIL_BOTH; } else if (backsector == NULL) @@ -1647,7 +1648,8 @@ void R_StoreWallRange (int start, int stop) if (ds_p->bFogBoundary || ds_p->maskedtexturecol != -1) { - InterestingDrawsegs.Push (ds_p - drawsegs); + size_t drawsegnum = ds_p - drawsegs; + InterestingDrawsegs.Push (drawsegnum); } } } diff --git a/src/s_sound.cpp b/src/s_sound.cpp index 9c882d62e1..101ec8d16c 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -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 // is being used from memory length = Wads.LumpLength (lumpnum); + if (length == 0) + { + offset = 0; + return false; + } musiccache.Resize(length); Wads.ReadLump(lumpnum, &musiccache[0]); }