From 397352a504decfee73950a9a8e6a8c2985559a12 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 19 May 2023 14:19:31 +0200 Subject: [PATCH] const char --- includes/font.h | 2 +- src/font.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/font.h b/includes/font.h index 6b5160b..8cc8c4a 100644 --- a/includes/font.h +++ b/includes/font.h @@ -20,7 +20,7 @@ int initFont(TTF_Font **, char *, int); * Renvoie 2 en cas de problème de surface avec la SDL * * Renvoie 0 en cas de succès */ -int writeText(GLuint *, TTF_Font *, char *, SDL_Color); +int writeText(GLuint *, TTF_Font *, const char *, SDL_Color); // Libère une police de la mémoire void freeFont(TTF_Font *); diff --git a/src/font.c b/src/font.c index 30071d7..62d5258 100644 --- a/src/font.c +++ b/src/font.c @@ -14,7 +14,8 @@ int initFont(TTF_Font **font, char *filename, int size) { return 0; } -int writeText(GLuint *_textTexId, TTF_Font *font, char *text, SDL_Color color) { +int writeText(GLuint *_textTexId, TTF_Font *font, const char *text, + SDL_Color color) { glGenTextures(1, _textTexId); assert(_textTexId);