shithub: qk1

Download patch

ref: 3d1b009488210891d70f0d3613551fdfeaabe09b
parent: 854729a4c1cd2db5a27628af9f77ed907251f875
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Oct 10 20:08:12 EDT 2023

model: don't underflow on mark surfaces

--- a/model.c
+++ b/model.c
@@ -891,8 +891,8 @@
 		out->contents = p;
 
 		out->firstmarksurface = loadmodel->marksurfaces +
-			LittleShort(in->firstmarksurface);
-		out->nummarksurfaces = LittleShort(in->nummarksurfaces);
+			(ushort)LittleShort(in->firstmarksurface);
+		out->nummarksurfaces = (ushort)LittleShort(in->nummarksurfaces);
 		
 		p = LittleLong(in->visofs);
 		if (p == -1)