aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2024-09-06 01:46:36 +0000
committerNIIBE Yutaka <[email protected]>2024-09-06 01:46:36 +0000
commit412e183e55c5b8b4aab30ec9a144c8c4c69d41c8 (patch)
tree9f9522e8f72b8cc38e73d8e4a8439ec1b5808673 /scd/app.c
parentscd:w32: Export GNUPGHOME for scd-event. (diff)
downloadgnupg-412e183e55c5b8b4aab30ec9a144c8c4c69d41c8.tar.gz
gnupg-412e183e55c5b8b4aab30ec9a144c8c4c69d41c8.zip
scd:w32: Fix for setting an environment block with GNUPGHOME.
* scd/app.c (report_change): It's ASCII or multi-byte encoded string. It's gpgrt's spawn function which converts it to wide char string internally if needed. -- Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'scd/app.c')
-rw-r--r--scd/app.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/scd/app.c b/scd/app.c
index ebba472c2..525950e99 100644
--- a/scd/app.c
+++ b/scd/app.c
@@ -2483,9 +2483,8 @@ report_change (int slot, int old_status, int cur_status)
homestr = make_filename (gnupg_homedir (), NULL);
#ifdef HAVE_W32_SYSTEM
- /* An environment block is terminated by two/four zero bytes. It's
- * four zero bytes for Unicode. Let us always use four zero bytes. */
- if (gpgrt_asprintf (&envstr, "GNUPGHOME=%s%c%c%c", homestr, 0, 0, 0) < 0)
+ /* An environment block is terminated by two zero bytes. */
+ if (gpgrt_asprintf (&envstr, "GNUPGHOME=%s%c", homestr, 0) < 0)
#else
if (gpgrt_asprintf (&envstr, "GNUPGHOME=%s", homestr) < 0)
#endif