diff --git a/src/font.c b/src/font.c index becb885..9bfd191 100644 --- a/src/font.c +++ b/src/font.c @@ -21,14 +21,14 @@ int writeText(GLuint *_textTexId, TTF_Font *font, char *text, SDL_Color color) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); SDL_Surface *d, *s; - if ((d = TTF_RenderUTF8_Blended_Wrapped(font, text, color, 0)) == NULL) { + if (!(d = TTF_RenderUTF8_Blended_Wrapped(font, text, color, 0))) { freeFont(font); fprintf(stderr, "Erreur TTF : TTF_RenderUTF8_Blended_Wrapped\n"); return 1; } - if ((s = SDL_CreateRGBSurface(0, d->w, d->h, 32, R_MASK, G_MASK, B_MASK, - A_MASK))) { + if (!(s = SDL_CreateRGBSurface(0, d->w, d->h, 32, R_MASK, G_MASK, B_MASK, + A_MASK))) { freeFont(font); fprintf(stderr, "Erreur SDL : %s\n", SDL_GetError()); return 2;