| author | |
| committer | |
| log | a9d2a7f00296ecda62d10fcecae52e1d9a7fc979 |
| tree | 9a7be41e0753a19b8662f8a1ff1321fde34f2120 |
| parent | dde7cc52d2f4780587b37604889c4568b8d79c62 |
| parent | e91136d61f732dad5fe1e65a2c9a05a30fe6541d |
| signature |
Fixed calls to mem.readInt2 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 |