From a2bc76b696a9951731a41d48cdb84a7c8df70e43 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Fri, 6 Aug 2004 17:33:46 +0000 Subject: [PATCH] * src/graphics.c: + Fix strict aliasing rules breakage. --- src/graphics.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/graphics.c b/src/graphics.c index 3afc21a..136e312 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -472,7 +472,11 @@ void caca_putstr(int x, int y, char const *s) SLsmg_write_string(_caca_empty_line + _caca_width - len); else #endif - SLsmg_write_string((char *)(intptr_t)s); + { + union { char *ch; const char *constch; } u; + u.constch = s; + SLsmg_write_string(u.ch); + } break; #endif #if defined(USE_NCURSES)