From: divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Thu, 5 Mar 2015 09:21:45 +0000 (+0000)
Subject: Fix a dead initialization. Fix a use of an uninitialized value.
X-Git-Tag: xonotic-v0.8.1~8^2~14
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fa20f76c173d9513a1e5543f840e008324ed71aa;p=xonotic%2Fdarkplaces.git

Fix a dead initialization. Fix a use of an uninitialized value.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12189 d7cf8633-e32d-0410-b094-e92efae38249
---

diff --git a/cl_particles.c b/cl_particles.c
index 7b8ef5bf..fb81172c 100644
--- a/cl_particles.c
+++ b/cl_particles.c
@@ -1785,6 +1785,11 @@ void CL_ReadPointFile_f (void)
 	VectorCopy(leakorg, vecorg);
 	Con_Printf("%i points read (%i particles spawned)\nLeak at %f %f %f\n", c, s, leakorg[0], leakorg[1], leakorg[2]);
 
+	if (c == 0)
+	{
+		return;
+	}
+
 	CL_NewParticle(vecorg, pt_beam, 0xFF0000, 0xFF0000, tex_beam, 64, 0, 255, 0, 0, 0, org[0] - 4096, org[1], org[2], org[0] + 4096, org[1], org[2], 0, 0, 0, 0, false, 1<<30, 1, PBLEND_ADD, PARTICLE_HBEAM, -1, -1, -1, 1, 1, 0, 0, NULL);
 	CL_NewParticle(vecorg, pt_beam, 0x00FF00, 0x00FF00, tex_beam, 64, 0, 255, 0, 0, 0, org[0], org[1] - 4096, org[2], org[0], org[1] + 4096, org[2], 0, 0, 0, 0, false, 1<<30, 1, PBLEND_ADD, PARTICLE_HBEAM, -1, -1, -1, 1, 1, 0, 0, NULL);
 	CL_NewParticle(vecorg, pt_beam, 0x0000FF, 0x0000FF, tex_beam, 64, 0, 255, 0, 0, 0, org[0], org[1], org[2] - 4096, org[0], org[1], org[2] + 4096, 0, 0, 0, 0, false, 1<<30, 1, PBLEND_ADD, PARTICLE_HBEAM, -1, -1, -1, 1, 1, 0, 0, NULL);
diff --git a/model_brush.c b/model_brush.c
index 5cc71a7e..6fd45ee7 100644
--- a/model_brush.c
+++ b/model_brush.c
@@ -4415,7 +4415,7 @@ static void Mod_Q2BSP_LoadTexinfo(sizebuf_t *sb)
 	// if we encounter the textures out of order, the later ones won't mark the earlier ones in a sequence, so the earlier 
 	for (i = 0, out = loadmodel->brushq1.texinfo;i < count;i++, out++)
 	{
-		int j = i;
+		int j;
 		texture_t *t = loadmodel->data_textures + out->textureindex;
 
 		// if this is not animated, skip it