aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/src/decode/decode_atom.c
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2013-01-23 10:17:29 +0100
committerSverker Eriksson <[email protected]>2013-01-23 16:07:39 +0100
commitd6e3e256b850050b7a86323b2948009d5fcc30a9 (patch)
tree15e98c67f814cb2fc317cd66fa7e8c83ad538a17 /lib/erl_interface/src/decode/decode_atom.c
parentc596e17cf3d69cf5e10d28ee2a8ee35162786da1 (diff)
downloadotp-d6e3e256b850050b7a86323b2948009d5fcc30a9.tar.gz
otp-d6e3e256b850050b7a86323b2948009d5fcc30a9.tar.bz2
otp-d6e3e256b850050b7a86323b2948009d5fcc30a9.zip
erl_interface: Fix bug when transcoding atoms from and to UTF8
Diffstat (limited to 'lib/erl_interface/src/decode/decode_atom.c')
-rw-r--r--lib/erl_interface/src/decode/decode_atom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/erl_interface/src/decode/decode_atom.c b/lib/erl_interface/src/decode/decode_atom.c
index 556c400cb3..9779ad3f35 100644
--- a/lib/erl_interface/src/decode/decode_atom.c
+++ b/lib/erl_interface/src/decode/decode_atom.c
@@ -76,8 +76,8 @@ int ei_decode_atom_as(const char *buf, int *index, char* p, int destlen,
}
else {
int plen = (got_enc == ERLANG_LATIN1) ?
- utf8_to_latin1(p, s, len, destlen-1, res_encp) :
- latin1_to_utf8(p, s, len, destlen-1, res_encp);
+ latin1_to_utf8(p, s, len, destlen-1, res_encp) :
+ utf8_to_latin1(p, s, len, destlen-1, res_encp);
if (plen < 0) return -1;
if (p) p[plen] = 0;
}