From cf501d29182ec85363e23c38cc4799073eacf2a8 Mon Sep 17 00:00:00 2001 From: Gabriele Date: Wed, 12 Aug 2015 18:03:59 +0200 Subject: [PATCH] Changed genericByteArray to correct the test results after Xcode update on 7 beta4 --- .../Protocols and Extensions/IntegerProtocols.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GPSafeSwiftPointer/Protocols and Extensions/IntegerProtocols.swift b/GPSafeSwiftPointer/Protocols and Extensions/IntegerProtocols.swift index 987895d..c23c627 100644 --- a/GPSafeSwiftPointer/Protocols and Extensions/IntegerProtocols.swift +++ b/GPSafeSwiftPointer/Protocols and Extensions/IntegerProtocols.swift @@ -76,8 +76,8 @@ func getGenericByteArray= 0; j--) { - ret[j] = UInt8((unsInt.toUIntMax() >> UIntMax(j * 8)) & 0xFF) + for (var j = 0 ; j < sizeofT ; j++) { + ret[sizeofT - j - 1] = UInt8((unsInt.toUIntMax() >> UIntMax(j * 8)) & 0xFF) } return ret @@ -88,8 +88,8 @@ func getGenericByteArray= 0; j--) { - ret[j] = UInt8((unsInt.toIntMax() >> IntMax(j * 8)) & 0xFF) + for (var j = 0 ; j < sizeofT; j++) { + ret[sizeofT - j - 1] = UInt8((unsInt.toIntMax() >> IntMax(j * 8)) & 0xFF) } return ret