Skip to content

Commit

Permalink
cachebuster: fix multiple template hashes in file
Browse files Browse the repository at this point in the history
  • Loading branch information
david-vanderson committed Dec 8, 2024
1 parent f0d4f6c commit 31893c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cacheBuster.zig
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn main() !void {
const needle = "TEMPLATE_HASH_WITH_PADDING__ITS_64_BYTES_LONG_THE_SAME_AS_SHA256";
var pos: usize = 0;
while (std.mem.indexOfPos(u8, template_bytes, pos, needle)) |idx| {
pos += idx + needle.len;
pos = idx + needle.len;
_ = try std.fmt.bufPrint(template_bytes[idx..][0..needle.len], "{s}", .{std.fmt.fmtSliceHexLower(&hash)});
}

Expand Down

0 comments on commit 31893c8

Please sign in to comment.