shithub: libgraphics

Download patch

ref: 8f076c6ee4f318dd8b32daa33cac9ed7985fa11a
parent: 743500008b9294a8cd876b638b054625f0122ceb
author: rodri <rgl@antares-labs.eu>
date: Sun Jun 29 19:00:14 EDT 2025

marshal: fix readmodel()

verts and prims were not being initialized correctly.

--- a/marshal.c
+++ b/marshal.c
@@ -388,7 +388,7 @@
 				error(&curline, "syntax error");
 				goto getout;
 			}
-			memset(&v, 0, sizeof v);
+			v = mkvert();
 
 			if(strcmp(f[1], "-") == 0){
 				error(&curline, "vertex has no position");
@@ -438,7 +438,7 @@
 				error(&curline, "syntax error");
 				goto getout;
 			}
-			memset(&P, 0, sizeof P);
+			P = mkprim(-1);
 
 			nv = strtoul(f[1], nil, 10);
 			switch(nv-1){
--