diff options
author | Sverker Eriksson <[email protected]> | 2013-01-22 19:25:36 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-01-22 19:34:03 +0100 |
commit | 1f4765cca4874fa92fcfad888fbe6d5f2fbf74d1 (patch) | |
tree | bf152c1b3dbf855dfc5a8724c3e043e161a971b6 /lib/erl_interface/src/misc | |
parent | 8eb544073fe243a8935a54f83f9c9f1f7478e3c5 (diff) | |
download | otp-1f4765cca4874fa92fcfad888fbe6d5f2fbf74d1.tar.gz otp-1f4765cca4874fa92fcfad888fbe6d5f2fbf74d1.tar.bz2 otp-1f4765cca4874fa92fcfad888fbe6d5f2fbf74d1.zip |
erl_interface: even more utf8 atom stuff
Diffstat (limited to 'lib/erl_interface/src/misc')
-rw-r--r-- | lib/erl_interface/src/misc/ei_format.c | 4 | ||||
-rw-r--r-- | lib/erl_interface/src/misc/ei_printterm.c | 2 | ||||
-rw-r--r-- | lib/erl_interface/src/misc/show_msg.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/erl_interface/src/misc/ei_format.c b/lib/erl_interface/src/misc/ei_format.c index 281a192535..b5f11e618e 100644 --- a/lib/erl_interface/src/misc/ei_format.c +++ b/lib/erl_interface/src/misc/ei_format.c @@ -139,8 +139,8 @@ static int patom(const char** fmt, ei_x_buff* x) --(*fmt); len = *fmt - start; /* FIXME why truncate atom name and not fail?! */ - if (len > MAXATOMLEN) - len = MAXATOMLEN; + if (len >= MAXATOMLEN) + len = MAXATOMLEN-1; return ei_x_encode_atom_len(x, start, len); } diff --git a/lib/erl_interface/src/misc/ei_printterm.c b/lib/erl_interface/src/misc/ei_printterm.c index 91fe73e68c..f3003a6172 100644 --- a/lib/erl_interface/src/misc/ei_printterm.c +++ b/lib/erl_interface/src/misc/ei_printterm.c @@ -115,7 +115,7 @@ static int print_term(FILE* fp, ei_x_buff* x, const char* buf, int* index) { int i, doquote, n, m, ty, r; - char a[MAXATOMLEN+1], *p; + char a[MAXATOMLEN], *p; int ch_written = 0; /* counter of written chars */ erlang_pid pid; erlang_port port; diff --git a/lib/erl_interface/src/misc/show_msg.c b/lib/erl_interface/src/misc/show_msg.c index ca46b15aff..33b09643ca 100644 --- a/lib/erl_interface/src/misc/show_msg.c +++ b/lib/erl_interface/src/misc/show_msg.c @@ -457,7 +457,7 @@ static void show_term(const char *termbuf, int *index, FILE *stream) break; case ERL_FUN_EXT: { - char atom[MAXATOMLEN+1]; + char atom[MAXATOMLEN]; long idx; long uniq; const char* s = termbuf + *index, * s0 = s; |