summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-10-27 08:37:43 +0100
committerAraq <rumpf_a@web.de>2015-10-27 08:37:43 +0100
commite94a6ec1f91c855ef1e5a2b54db7a5cbe8d245d4 (patch)
tree5d508096caa15d6f57e0e85747fc1cb2299bc023 /lib
parentee08c6eecf348598b08de81fef52b5b0472594b1 (diff)
downloadNim-e94a6ec1f91c855ef1e5a2b54db7a5cbe8d245d4.tar.gz
added an assertion
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/times.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim
index 3142952e7..a478b9d65 100644
--- a/lib/pure/times.nim
+++ b/lib/pure/times.nim
@@ -439,7 +439,9 @@ when not defined(JS):
   proc getTime(): Time = return timec(nil)
   proc getLocalTime(t: Time): TimeInfo =
     var a = t
-    result = tmToTimeInfo(localtime(addr(a))[], true)
+    let lt = localtime(addr(a))
+    assert(not lt.isNil)
+    result = tmToTimeInfo(lt[], true)
     # copying is needed anyway to provide reentrancity; thus
     # the conversion is not expensive