Skip to content

Commit

Permalink
fix string handling in DATA statements (fixes #18, thanks to Tom Wils…
Browse files Browse the repository at this point in the history
…on for reporting this one)
  • Loading branch information
gooofy committed Jan 8, 2022
1 parent 1fe54c9 commit 49104af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit 49104af

Please sign in to comment.