diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-02-17 10:30:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-17 19:30:09 +0100 |
commit | 31bb67a309ae4bfdc1909c0a7c6748a534a0b00e (patch) | |
tree | 8169cc14488a083ffb2d1e8373042bdc0c0c0e73 /lib/system/excpt.nim | |
parent | 35e14998ec97deb4efdbec9390b607c876a7a17f (diff) | |
download | Nim-31bb67a309ae4bfdc1909c0a7c6748a534a0b00e.tar.gz |
add -d:nimStrictMode in CI to keep code from regressing; fixes ConvFromXtoItselfNotNeeded, UnusedImport notes (#16764)
Diffstat (limited to 'lib/system/excpt.nim')
-rw-r--r-- | lib/system/excpt.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index 95dbfe3af..dbb39f536 100644 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -378,7 +378,8 @@ proc reportUnhandledErrorAux(e: ref Exception) {.nodestroy.} = # ugly, but avoids heap allocations :-) template xadd(buf, s, slen) = if L + slen < high(buf): - copyMem(addr(buf[L]), cstring(s), slen) + + copyMem(addr(buf[L]), (when s is cstring: s else: cstring(s)), slen) inc L, slen template add(buf, s) = xadd(buf, s, s.len) |