From f815e6919543909adb0588f5fda25480839ef56f Mon Sep 17 00:00:00 2001 From: johanknol Date: Sun, 6 Jan 2002 15:29:55 +0000 Subject: [PATCH] fixed bug #498740 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1775 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCglue.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/SDCCglue.c b/src/SDCCglue.c index 20890034..9a4c15fa 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -738,12 +738,16 @@ printIvalArray (symbol * sym, sym_link * type, initList * ilist, /* take care of the special case */ /* array of characters can be init */ /* by a string */ - if (IS_CHAR (type->next)) + if (IS_CHAR (type->next)) { + if (!IS_LITERAL(list2val(ilist)->etype)) { + werror (W_INIT_WRONG); + return; + } if (printIvalChar (type, (ilist->type == INIT_DEEP ? ilist->init.deep : ilist), oFile, SPEC_CVAL (sym->etype).v_char)) return; - + } /* not the special case */ if (ilist->type != INIT_DEEP) { -- 2.39.2