From dc86f5e04ad0d44a3a7f8c1d25ae65fe581912c3 Mon Sep 17 00:00:00 2001 From: DissolveDZ Date: Sat, 30 Sep 2023 18:43:09 +0200 Subject: [PATCH] fixed sefault when calling the function with null pointer --- src/rtext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtext.c b/src/rtext.c index fc78b6932..d3392aaf4 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1424,7 +1424,7 @@ int TextCopy(char *dst, const char *src) // REQUIRES: strcmp() bool TextIsEqual(const char *text1, const char *text2) { - return !strcmp(text1, text2); + return text1 && text2 ? !strcmp(text1, text2) : 0; } // Get a piece of a text string