summary refs log tree commit diff stats
path: root/lib/system/repr.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/repr.nim')
-rw-r--r--lib/system/repr.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/repr.nim b/lib/system/repr.nim
index 6b6f7e340..13118e40b 100644
--- a/lib/system/repr.nim
+++ b/lib/system/repr.nim
@@ -17,7 +17,7 @@ proc reprFloat(x: float): string {.compilerproc.} = return $x
 
 proc reprPointer(x: pointer): string {.compilerproc.} =
   result = newString(60)
-  let n = c_sprintf(cast[cstring](addr result[0]), "%p", x)
+  let n = c_snprintf(cast[cstring](addr result[0]), csize_t(60), "%p", x)
   setLen(result, n)
 
 proc reprStrAux(result: var string, s: cstring; len: int) =