mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-09 14:32:53 +00:00
Stop paramStr from always throwing an exception
This commit is contained in:
@@ -1633,7 +1633,7 @@ elif not defined(createNimRtl):
|
||||
|
||||
proc paramStr*(i: int): TaintedString {.tags: [FReadIO].} =
|
||||
# Docstring in nimdoc block.
|
||||
if i < cmdCount and i >= 0: result = TaintedString($cmdLine[i])
|
||||
if i < cmdCount and i >= 0: return TaintedString($cmdLine[i])
|
||||
raise newException(EInvalidIndex, "invalid index")
|
||||
|
||||
proc paramCount*(): int {.tags: [FReadIO].} =
|
||||
|
||||
Reference in New Issue
Block a user