diff options
-rw-r--r--[-rwxr-xr-x] | bootstrap.sh | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | lib/pure/unittest.nim | 0 | ||||
-rw-r--r-- | lib/system/dyncalls.nim | 5 |
3 files changed, 3 insertions, 2 deletions
diff --git a/bootstrap.sh b/bootstrap.sh index 7f19c2440..7f19c2440 100755..100644 --- a/bootstrap.sh +++ b/bootstrap.sh diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index aca9d51e2..aca9d51e2 100755..100644 --- a/lib/pure/unittest.nim +++ b/lib/pure/unittest.nim diff --git a/lib/system/dyncalls.nim b/lib/system/dyncalls.nim index ba5e4bbeb..3b3d1f87d 100644 --- a/lib/system/dyncalls.nim +++ b/lib/system/dyncalls.nim @@ -109,9 +109,10 @@ elif defined(windows) or defined(dos): proc nimGetProcAddr(lib: LibHandle, name: cstring): ProcAddr = result = getProcAddress(cast[THINSTANCE](lib), name) if result != nil: return + var decorated: array[250, char] for i in countup(0, 50): - var decorated = "_" & $name & "@" & $(i * 4) - result = getProcAddress(cast[THINSTANCE](lib), cstring(decorated)) + discard csprintf(decorated, "_%s@%ld", name, i*4) + result = getProcAddress(cast[THINSTANCE](lib), decorated) if result != nil: return procAddrError(name) |