Skip to content

Commit

Permalink
imcc encodings: fix unicode encoded constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Oct 9, 2014
1 parent 940ede1 commit 761b245
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions compilers/imcc/pbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ IMCC_string_from_reg(ARGMOD(imc_info_t * imcc), ARGIN(SymReg *r))
if (Interp_trace_TEST(imcc->interp, 8))
fprintf(stderr, "# string_from_reg '%s'\n", buf);
if (!p) {
r->type -= VT_ENCODED; /* FIXME! */
r->type -= VT_ENCODED; /* FIXME! Whose fault is this? */
goto bare;
}
PARROT_ASSERT(p && p[-1] == ':');
Expand All @@ -1069,7 +1069,7 @@ IMCC_string_from_reg(ARGMOD(imc_info_t * imcc), ARGIN(SymReg *r))
memcpy(encoding_name, buf, len);
encoding_name[len] = '\0';

return Parrot_str_unescape(imcc->interp, p + 1, '"', encoding_name);
return Parrot_str_unescape(imcc->interp, p+1, '"', encoding_name);
}
else if (*buf == '"') {
buf++;
Expand Down
2 changes: 1 addition & 1 deletion src/string/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -2821,7 +2821,7 @@ Parrot_str_unescape(PARROT_INTERP,
if (clength) {
STRING *src = Parrot_str_new_init(interp, cstring, clength, src_encoding,
PObj_external_FLAG);
return Parrot_str_unescape_string(interp, src, Parrot_ascii_encoding_ptr,
return Parrot_str_unescape_string(interp, src, src_encoding,
PObj_constant_FLAG);
} else {
return Parrot_str_new_init(interp, "", 0, encoding,
Expand Down

0 comments on commit 761b245

Please sign in to comment.