shithub: qk1

Download patch

ref: d1d313fc2b61a28454d3f72715afdb965c294604
parent: 523e376afd75e46eed53cc160ecd1704ff8d1d9e
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Dec 17 13:26:30 EST 2023

fix a warning

--- a/d_scan.c
+++ b/d_scan.c
@@ -215,6 +215,7 @@
 		do{
 			// calculate s and t at the far end of the span
 			spancount = min(count, 16);
+			spancountminus1 = spancount - 1;
 			count -= spancount;
 
 			if(count){
@@ -241,7 +242,6 @@
 				// can't step off polygon), clamp, calculate s and t steps across
 				// span by division, biasing steps low so we don't run off the
 				// texture
-				spancountminus1 = spancount - 1;
 				sdivz += d_sdivzstepu * spancountminus1;
 				tdivz += d_tdivzstepu * spancountminus1;
 				z = (float)0x10000 / (zi + d_zistepu * spancountminus1);	// prescale to 16.16 fixed-point