components/tft/tft.c

changeset 91
255a75322212
parent 38
537ffe280775
--- a/components/tft/tft.c	Thu Jun 11 22:53:04 2020 +0200
+++ b/components/tft/tft.c	Mon May 17 20:44:35 2021 +0200
@@ -579,27 +579,27 @@
     // Open the file
     FILE *fhndl = fopen(fontfile, "r");
     if (!fhndl) {
-    	sprintf(err_msg, "Error opening font file '%s'", fontfile);
+    	sprintf(err_msg, "Error open font '%s'", fontfile);
 		err = 1;
 		goto exit;
     }
 
 	// Get file size
     if (stat(fontfile, &sb) != 0) {
-    	sprintf(err_msg, "Error getting font file size");
+    	sprintf(err_msg, "stat error");
 		err = 2;
 		goto exit;
     }
 	int fsize = sb.st_size;
 	if (fsize < 30) {
-		sprintf(err_msg, "Error getting font file size");
+		sprintf(err_msg, "Error font file size");
 		err = 3;
 		goto exit;
 	}
 
 	userfont = malloc(fsize+4);
 	if (userfont == NULL) {
-		sprintf(err_msg, "Font memory allocation error");
+		sprintf(err_msg, "Font malloc error");
 		fclose(fhndl);
 		err = 4;
 		goto exit;

mercurial