Skip to content

Commit

Permalink
fix CI again
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Jan 14, 2022
1 parent ee22492 commit eaf4ab8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- `macros.parseExpr` and `macros.parseStmt` now accept an optional
filename argument for more informative errors.
- Module `colors` expanded with missing colors from the CSS color standard.
- `md5` now works at compile time and in JavaScript.

## `std/smtp`

Expand Down
9 changes: 5 additions & 4 deletions lib/pure/md5.nim
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

## Module for computing [MD5 checksums](https://en.wikipedia.org/wiki/MD5).
##
## **Note:** The procs in this module can be used at compile time.
## This module also works at compile time and in JavaScript.
##
## See also
## ========
Expand Down Expand Up @@ -297,9 +297,10 @@ proc writeBuffer(c: var MD5Context, index: int,
memOrNot:
copyMem(addr(c.buffer[index]), unsafeAddr(input[inputIndex]), len)
do:
{.noSideEffect.}:
# `[]=` can sometimes track RangeDefect, even though it cannot be raised here
c.buffer[index .. index + len - 1] = input.slice(inputIndex, inputIndex + len - 1)
# cannot use system.`[]=` for arrays and openarrays as
# it can raise RangeDefect which gets tracked
for i in 0..<len:
c.buffer[index + i] = input[inputIndex + i]

proc md5Update*(c: var MD5Context, input: openArray[uint8]) =
## Updates the `MD5Context` with the `input` data.
Expand Down

0 comments on commit eaf4ab8

Please sign in to comment.