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
1631 1631
		unsigned long tmp = 0;
1632 1632
		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
1633 1633
		s += NATINT_LEN(long,4);
1634
#if WORDS_BIGENDIAN && SIZEOF_LONG == 8
1635
		rb_ary_push(ary, ULONG2NUM(swap32(tmp)));
1636
#else
1634 1637
		rb_ary_push(ary, ULONG2NUM(vtohl(tmp)));
1638
#endif
1635 1639
	    }
1636 1640
	    PACK_ITEM_ADJUST();
1637 1641
	    break;