diff options
author | Araq <rumpf_a@web.de> | 2015-08-18 13:58:57 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-08-18 13:58:57 +0200 |
commit | 10a7830ba2b5e26f8a37c160f7425a3130d67ae0 (patch) | |
tree | 79566d19cf3c5c10c8d51de757dc5369bb1f76b3 /lib/impure | |
parent | d634da775db3ee28b075b60c6c898a24167e0ce0 (diff) | |
download | Nim-10a7830ba2b5e26f8a37c160f7425a3130d67ae0.tar.gz |
fixes Windows version of readPasswordFromStdin (setLen doesn't accept negative values anymore)
Diffstat (limited to 'lib/impure')
-rw-r--r-- | lib/impure/rdstdin.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/impure/rdstdin.nim b/lib/impure/rdstdin.nim index 14aefb315..b373859f4 100644 --- a/lib/impure/rdstdin.nim +++ b/lib/impure/rdstdin.nim @@ -94,7 +94,7 @@ when defined(Windows): while i < password.len: x = runeLenAt(password, i) inc i, x - password.setLen(password.len - x) + password.setLen(max(password.len - x, 0)) else: password.add(toUTF8(c.Rune)) stdout.write "\n" |