From 6fb31a3ae538249147b4026eb1b421e00c096e4e Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Sun, 22 Mar 2026 17:39:21 +0100 Subject: [PATCH] - [FIX] Fallaba al carregar fonts amb format de final de linea de Windows --- mini.cpp | 2 ++ version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mini.cpp b/mini.cpp index cffb6de..5fb0a20 100644 --- a/mini.cpp +++ b/mini.cpp @@ -435,6 +435,7 @@ uint8_t loadfont_from_buffer(const char* buffer, uint8_t index, const char* name memcpy(line, ptr, len); line[len] = '\0'; ptr += (ptr[len] == '\n') ? len + 1 : len; // Advance pointer + if (len > 0 && line[len - 1] == '\r') line[len - 1] = '\0'; if (strncmp(line, "bitmap=", 7) != 0) return false; // Parse first line @@ -453,6 +454,7 @@ uint8_t loadfont_from_buffer(const char* buffer, uint8_t index, const char* name memcpy(line, ptr, len); line[len] = '\0'; ptr += (ptr[len] == '\n') ? len + 1 : len; // Advance pointer + if (len > 0 && line[len - 1] == '\r') line[len - 1] = '\0'; // Remove comments char* hash = strchr(line, '#'); diff --git a/version.h b/version.h index a84ab09..4c18326 100644 --- a/version.h +++ b/version.h @@ -1,3 +1,3 @@ #pragma once -#define MINI_VERSION "1.4.8" +#define MINI_VERSION "1.4.9"