mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
fixes Windows version of readPasswordFromStdin (setLen doesn't accept negative values anymore)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user