From 58498cf5f21375c3ab89a8486175ff8de087bdf7 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 24 Jul 2019 20:32:14 -0700 Subject: GLK: Fixing some gcc 8 warnings --- engines/glk/hugo/hemisc.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'engines/glk/hugo') diff --git a/engines/glk/hugo/hemisc.cpp b/engines/glk/hugo/hemisc.cpp index 880305076d..50ff4f7891 100644 --- a/engines/glk/hugo/hemisc.cpp +++ b/engines/glk/hugo/hemisc.cpp @@ -635,8 +635,6 @@ unsigned int Hugo::Dict() { } void Hugo::FatalError(int n) { - char fatalerrorline[64]; - #if defined (DEBUGGER) hugo_stopmusic(); hugo_stopsample(); @@ -732,8 +730,8 @@ if (n==UNKNOWN_OP_E || n==ILLEGAL_OP_E || n==EXPECT_VAL_E || n==OVERFLOW_E) fprintf(stderr, "\n"); } */ - sprintf(fatalerrorline, "\nFatal Error: %s", line); - PRINTFATALERROR(fatalerrorline); + Common::String msg = Common::String::format("\nFatal Error: %s", line); + PRINTFATALERROR(msg.c_str()); hugo_closefiles(); hugo_blockfree(mem); -- cgit v1.2.3