Project

General

Profile

Bug #1131 » bnc603914_string_unpack.patch

Proposed patch - kkaempf (Klaus Kämpf), 05/10/2010 03:48 AM

View differences:

./pack.c 2010-05-07 22:44:28.000000000 +0200
unsigned long tmp = 0;
memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
s += NATINT_LEN(long,4);
#if WORDS_BIGENDIAN && SIZEOF_LONG == 8
rb_ary_push(ary, ULONG2NUM(swap32(tmp)));
#else
rb_ary_push(ary, ULONG2NUM(vtohl(tmp)));
#endif
}
PACK_ITEM_ADJUST();
break;
(3-3/3)