summaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/ffi.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gpgscm/ffi.c')
-rw-r--r--tests/gpgscm/ffi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/gpgscm/ffi.c b/tests/gpgscm/ffi.c
index dde5b52..355021c 100644
--- a/tests/gpgscm/ffi.c
+++ b/tests/gpgscm/ffi.c
@@ -353,6 +353,11 @@ do_get_temp_path (scheme *sc, pointer args)
#ifdef HAVE_W32_SYSTEM
if (GetTempPath (MAX_PATH+1, buffer) == 0)
FFI_RETURN_STRING (sc, "/temp");
+ else
+ {
+ size_t len = strlen (buffer);
+ buffer[len-1] = 0;
+ }
FFI_RETURN_STRING (sc, buffer);
#else
FFI_RETURN_STRING (sc, "/tmp");