shithub: tinygl

Download patch

ref: 74f67cc4a4bfcd51d91cd4e79e55bc2a2580e2b5
parent: a5b08e27b75cdacc6f8405febbc55b40095fb1af
author: MHS <gek@katherine>
date: Sat Apr 10 09:26:59 EDT 2021

Automatic commit.

--- a/Raw_Demos/bigfont.c
+++ b/Raw_Demos/bigfont.c
@@ -19,7 +19,7 @@
 	if(argc > 1) fillchar = argv[1][0];
 	
 	{
-		unsigned long long l;
+		unsigned long l;
 		unsigned char* b = (unsigned char*)read_until_terminator_alloced(stdin, &l, '\n', 30);
 		if(b)
 		do {
--- a/Raw_Demos/t2i.c
+++ b/Raw_Demos/t2i.c
@@ -72,7 +72,7 @@
 			larg = argv[i];
 		}
 	}
-	unsigned long long lout;
+	unsigned long lout;
 	char* text = read_until_terminator_alloced(stdin, &lout, '\0', 2);
 	imbuf = calloc(1,sizeof(PIXEL) * winSizeX * winSizeY);
 	ZBuffer* frameBuffer = NULL;
--- a/include-demo/stringutil.h
+++ b/include-demo/stringutil.h
@@ -187,7 +187,7 @@
 	for(j = 0; j < ntokens; j++){
 		out = strcataf1(out, tokens[2*j]);
 		
-		snprintf(c_str, 512, "%llu", (unsigned long)strlen(tokens[2*j+1]));
+		sprintf(c_str, "%lu", (unsigned long)strlen(tokens[2*j+1]));
 		out = strcataf1(out, c_str);
 		c_str[0] = tokmark;
 		c_str[1] = 0;
@@ -215,7 +215,8 @@
 				c_str[1] = 0;
 				out = strcataf1(out, c_str);
 				if(howmany > 1){
-					snprintf(c_str, 512, "%llu", (unsigned long)howmany);
+					/*snprintf(c_str, 512, "%lu", (unsigned long)howmany);*/
+					sprintf(c_str, "%lu", (unsigned long)howmany);
 					out = strcataf1(out, c_str);
 				}
 				out = strcataf1(out, tokens[t*2]);