diff options
author | NIIBE Yutaka <[email protected]> | 2024-09-06 01:46:36 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2024-09-06 01:46:36 +0000 |
commit | 412e183e55c5b8b4aab30ec9a144c8c4c69d41c8 (patch) | |
tree | 9f9522e8f72b8cc38e73d8e4a8439ec1b5808673 /scd/app.c | |
parent | scd:w32: Export GNUPGHOME for scd-event. (diff) | |
download | gnupg-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.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 |