From c9a2acefc1f34801df4e57d8a2462bff4a0666d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20D=C3=B6ring?= Date: Tue, 6 Jun 2017 22:33:52 +0200 Subject: [PATCH] fix --- lib/system/repr.nim | 2 +- tests/gc/gctest.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/system/repr.nim b/lib/system/repr.nim index 172b4c08c..58c86b0db 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.} = var buf: array[60, char] - discard c_sprintf(result[0].addr, "%p", x) + discard c_sprintf(buf.cstring, "%p", x) result = $buf.cstring proc `$`(x: uint64): string = diff --git a/tests/gc/gctest.nim b/tests/gc/gctest.nim index b3b9af608..f5c81f033 100644 --- a/tests/gc/gctest.nim +++ b/tests/gc/gctest.nim @@ -31,7 +31,7 @@ type of nkList: sons: seq[PCaseNode] else: unused: seq[string] - TIdObj* = object of TObject + TIdObj* = object of RootObj id*: int # unique id; use this for comparisons and not the pointers PIdObj* = ref TIdObj