diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f861c59..e7e7ef7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,9 @@ Bug Fixes: * compiler: do not abort on type system inconsistencies (e.g. unresolved forwarded types) * compiler: check and resolve all forward ptrs * compiler: fix err msg position for constant declaration expression - * compiler: fix string type coercion + * compiler: fix string type coercion (fixes #17, thanks to Tom Wilson for reporting this one) * compiler: fix negative numeric literal handling in DATA statements + * compiler: fix string handling in DATA statements (fixes #18, thanks to Tom Wilson for reporting this one) * runtime: fix INT() behavior (matches ACE now), add CLNG() to online help * use EXIT\_FAILURE for fatal error conditions (fixes issue #13 by polluks) * add "$VER" version string diff --git a/src/compiler/frontend.c b/src/compiler/frontend.c index a7fc50a7..ffcbc5a7 100644 --- a/src/compiler/frontend.c +++ b/src/compiler/frontend.c @@ -3576,7 +3576,7 @@ static bool dataItem(S_tkn *tkn) c = Ty_ConstString (Ty_String(), S_name((*tkn)->u.sym)); break; case S_STRING: - c = Ty_ConstString (Ty_String(), (*tkn)->u.str); + c = Ty_ConstString (Ty_String(), String(UP_frontend, (*tkn)->u.str)); break; default: return EM_error((*tkn)->pos, "DATA: numeric or string literal expected here.");