summary refs log tree commit diff stats
path: root/lib/system/memory.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/memory.nim')
-rw-r--r--lib/system/memory.nim4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/system/memory.nim b/lib/system/memory.nim
index 50faa3d86..156773c48 100644
--- a/lib/system/memory.nim
+++ b/lib/system/memory.nim
@@ -2,9 +2,6 @@
 
 const useLibC = not defined(nimNoLibc)
 
-when not defined(nimHasHotCodeReloading):
-  {.pragma: nonReloadable.}
-
 when useLibC:
   import ansi_c
 
@@ -46,6 +43,7 @@ proc nimCmpMem*(a, b: pointer, size: Natural): cint {.compilerproc, nonReloadabl
       inc i
 
 proc nimCStrLen*(a: cstring): int {.compilerproc, nonReloadable, inline.} =
+  if a.isNil: return 0
   when useLibC:
     cast[int](c_strlen(a))
   else: