freebsd-ports/lang/erlang/files/patch-lib_erl__interface_src_decode_decode__longlong.c
Jimmy Olgeni 2107c1b748 The ei_decode_longlong function fails when decoding long values >
2^32, due to a missing cast.

Obtained from:	Javier París Fernández <paris@dc.fi.udc.es> on erlang-questions
2003-08-31 14:39:34 +00:00

14 lines
359 B
C

$FreeBSD$
--- lib/erl_interface/src/decode/decode_longlong.c.orig Sun Aug 31 14:00:44 2003
+++ lib/erl_interface/src/decode/decode_longlong.c Sun Aug 31 14:01:41 2003
@@ -51,7 +51,7 @@
int pos, shift = 0;
n = 0;
for (pos = 0; pos < arity; pos++) {
- n |= get8(s) << shift;
+ n |= ((EI_LONGLONG) get8(s)) << shift;
shift += 8;
}
}