fixes Windows version of readPasswordFromStdin (setLen doesn't accept negative values anymore)

This commit is contained in:
Araq
2015-08-18 13:58:57 +02:00
parent d634da775d
commit 10a7830ba2

View File

@@ -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"