Skip to content

Commit

Permalink
fix bug; add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ojwb committed Dec 23, 2024
1 parent c1d8643 commit e951701
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/wrapmsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
Expand Down Expand Up @@ -55,10 +56,14 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
wchar_t *e = malloc((e_len + strlen("OPENSSL_MODULES=") + 1) * sizeof(wchar_t));
if (!e) return 1;
wcscpy(e, L"OPENSSL_MODULES=");
memcpy(e + strlen("OPENSSL_MODULES=") * sizeof(wchar_t), e_val, e_len * sizeof(wchar_t));
memcpy(e + strlen("OPENSSL_MODULES="), e_val, e_len * sizeof(wchar_t));
e[strlen("OPENSSL_MODULES=") + e_len] = L'\0';
wprintf("setenv %ls\n", e);
printf("setenv %ls\n", e);
_wputenv(e);
wcscpy(buf + got - 4, L"_.exe");
wprintf("command %ls\n", buf);
printf("command %ls\n", buf);
}
len += len;
}
Expand Down

0 comments on commit e951701

Please sign in to comment.