mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-25 23:14:59 -07:00
Merge branch 'master' of https://github.com/odin-lang/Odin
This commit is contained in:
@@ -419,8 +419,10 @@ update :: proc(ctx: ^$T, data: []byte) {
|
||||
sha2_transf(ctx, shifted_message, block_nb)
|
||||
|
||||
rem_len = new_len % CURR_BLOCK_SIZE
|
||||
when T == Sha256_Context {copy(ctx.block[:], shifted_message[block_nb << 6:rem_len])}
|
||||
else when T == Sha512_Context {copy(ctx.block[:], shifted_message[block_nb << 7:rem_len])}
|
||||
if rem_len > 0 {
|
||||
when T == Sha256_Context {copy(ctx.block[:], shifted_message[block_nb << 6:rem_len])}
|
||||
else when T == Sha512_Context {copy(ctx.block[:], shifted_message[block_nb << 7:rem_len])}
|
||||
}
|
||||
|
||||
ctx.length = rem_len
|
||||
when T == Sha256_Context {ctx.tot_len += (block_nb + 1) << 6}
|
||||
|
||||
@@ -746,6 +746,8 @@ dynamic_pool_reset :: proc(using pool: ^Dynamic_Pool) {
|
||||
free(a, block_allocator)
|
||||
}
|
||||
clear(&out_band_allocations)
|
||||
|
||||
bytes_left = 0 // Make new allocations call `cycle_new_block` again.
|
||||
}
|
||||
|
||||
dynamic_pool_free_all :: proc(using pool: ^Dynamic_Pool) {
|
||||
|
||||
Reference in New Issue
Block a user