Skip to content

Commit

Permalink
Merge pull request zigimg#185 from zigimg/issue-184-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mlarouche authored Oct 26, 2024
2 parents 4c8ea54 + 2dc429a commit 5b5d718
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/formats/jpeg/Scan.zig
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ pub const Header = struct {

if (JPEG_DEBUG) std.debug.print(" Component count: {}\n", .{component_count});

var components:[4]?ScanComponentSpec = @splat(null);
var components: [4]?ScanComponentSpec = @splat(null);

if (JPEG_VERY_DEBUG) std.debug.print(" Components:\n", .{});
var i: usize = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/formats/pcx.zig
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ test "PCX RLE Fast encoder" {
}

test "PCX RLE Fast encoder should encore more than 63 bytes similar" {
const first_uncompressed_part:[65]u8 = @splat(0x45);
const first_uncompressed_part: [65]u8 = @splat(0x45);
const second_uncompresse_part = [_]u8{ 0x1, 0x1, 0x1, 0x1 };
const uncompressed_data = first_uncompressed_part ++ second_uncompresse_part;

Expand Down
2 changes: 1 addition & 1 deletion src/formats/png/reader.zig
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const IDatChunksReader = struct {
}

fn fillBuffer(self: *Self, to_read: usize) ImageUnmanaged.ReadError!usize {
@memcpy(self.buffer[0..self.data.len], self.data);
mem.copyForwards(u8, self.buffer[0..self.data.len], self.data);
const new_start = self.data.len;
var max = self.buffer.len;
if (max > self.remaining_chunk_length) {
Expand Down
2 changes: 1 addition & 1 deletion src/formats/tga.zig
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ test "TGA RLE SIMD u8 (bytes) encoder" {
}

test "TGA RLE SIMD u8 (bytes) encoder should encore more than 128 bytes similar" {
const first_uncompressed_part:[135]u8 = @splat(0x45);
const first_uncompressed_part: [135]u8 = @splat(0x45);
const second_uncompresse_part = [_]u8{ 0x1, 0x1, 0x1, 0x1 };
const uncompressed_data = first_uncompressed_part ++ second_uncompresse_part;

Expand Down
2 changes: 1 addition & 1 deletion tests/formats/png_test.zig
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ pub fn testWithDir(directory: []const u8, testMd5Sig: bool) !void {
std.crypto.hash.Md5.hash(result_bytes, &md5_val, .{});

const len = entry.name.len;
var tst_data_name: [50]u8 = undefined;
var tst_data_name: [200]u8 = undefined;
@memcpy(tst_data_name[0 .. len - 3], entry.name[0 .. len - 3]);
@memcpy(tst_data_name[len - 3 .. len], "tsd");

Expand Down

0 comments on commit 5b5d718

Please sign in to comment.