mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
3 minor sample game cleanups:
* changed bitwise & to logical && * removed redundant state check * moved a strcpy inside a NULL check to prevent a crash. NOTE: nothing sensible will happen as a result, but no crash at least.
This commit is contained in:
@ -110,10 +110,12 @@ void InitEndingScreen(void)
|
||||
{
|
||||
// WARNING: It fails if the last sentence word has a '.' after space
|
||||
char *title = StringReplace(headline, messageWords[i].text, codingWords[messageWords[i].id]);
|
||||
|
||||
strcpy(headline, title); // Base headline updated
|
||||
|
||||
if (title != NULL) free(title);
|
||||
|
||||
if (title != NULL)
|
||||
{
|
||||
strcpy(headline, title); // Base headline updated
|
||||
free(title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user