fix condition

This commit is contained in:
hackgrid 2023-10-30 12:22:24 +01:00 committed by GitHub
parent ec80a3b315
commit 85fe99db91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -514,10 +514,8 @@ void controlsRenderPrompt(enum ControllerAction action, char* message, float opa
}
void controlsRenderSubtitle(char* message, float textOpacity, float backgroundOpacity, struct RenderState* renderState, enum SubtitleType subtitleType) {
if ((message != NULL) && (message[0] == '\0')) {
if (message == NULL || (message != NULL && message[0] == '\0'))
return;
}
struct FontRenderer* fontRender = stackMalloc(sizeof(struct FontRenderer));
fontRendererLayout(fontRender, &gDejaVuSansFont, message, SCREEN_WD - (SUBTITLE_SIDE_MARGIN + SUBTITLE_PADDING) * 2);