| author | |
| committer | |
| log | ad438cfd40aba682a0bcd88ed607c2cbd378f647 |
| tree | 668908ca6cb86f185bb2b1ca72d9224bd45774bf |
| parent | e932919e680aa6b6ef910e1c4ad969ac1ce0c46d |
| parent | a9d2a7f00296ecda62d10fcecae52e1d9a7fc979 |
2 files changed, 2 insertions(+), 2 deletions(-)
std/endian.zig+1-1| ... | @@ -16,5 +16,5 @@ pub fn swapIf(endian: builtin.Endian, comptime T: type, x: T) -> T { | ... | @@ -16,5 +16,5 @@ pub fn swapIf(endian: builtin.Endian, comptime T: type, x: T) -> T { |
| 16 | pub fn swap(comptime T: type, x: T) -> T { | 16 | pub fn swap(comptime T: type, x: T) -> T { |
| 17 | var buf: [@sizeOf(T)]u8 = undefined; | 17 | var buf: [@sizeOf(T)]u8 = undefined; |
| 18 | mem.writeInt(buf[0..], x, false); | 18 | mem.writeInt(buf[0..], x, false); |
| 19 | return mem.readInt(buf, T, true); | 19 | return mem.readInt(buf, T, builtin.Endian.Big); |
| 20 | } | 20 | } |
std/rand.zig+1-1| ... | @@ -43,7 +43,7 @@ pub const Rand = struct { | ... | @@ -43,7 +43,7 @@ pub const Rand = struct { |
| 43 | } else { | 43 | } else { |
| 44 | var result: [@sizeOf(T)]u8 = undefined; | 44 | var result: [@sizeOf(T)]u8 = undefined; |
| 45 | r.fillBytes(result[0..]); | 45 | r.fillBytes(result[0..]); |
| 46 | return mem.readInt(result, T, false); | 46 | return mem.readInt(result, T, builtin.Endian.Little); |
| 47 | } | 47 | } |
| 48 | } | 48 | } |
| 49 | 49 |