From beab63887cb3d1ddcddf2173fd99c7b17434c919 Mon Sep 17 00:00:00 2001 From: DissolveDZ Date: Sat, 30 Sep 2023 18:44:46 +0200 Subject: [PATCH] checked if text is empty to return early --- src/rtext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtext.c b/src/rtext.c index d3392aaf4..ee17c839a 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1430,7 +1430,7 @@ bool TextIsEqual(const char *text1, const char *text2) // Get a piece of a text string const char *TextSubtext(const char *text, int position, int length) { - if (!length) + if (!length || !text) return ""; int textLength = TextLength(text); if (position >= textLength)