Skip to content

Commit

Permalink
Fix startup on Linux and others.
Browse files Browse the repository at this point in the history
  • Loading branch information
renpytom committed Dec 21, 2024
1 parent 9bb53a5 commit 09bc428
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/librenpython3.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static wchar_t *decode_utf8(const char *s) {
unsigned char *p = (unsigned char *) s;
unsigned int ch;

rv = (wchar_t *) malloc(strlen(s) * 2 + 2);
rv = (wchar_t *) malloc(strlen(s) * sizeof(wchar_t) + sizeof(wchar_t));
wchar_t *q = rv;

while (*p) {
Expand Down Expand Up @@ -193,7 +193,7 @@ static void take_argv0(char *argv0) {
exedir = strdup(argv0);
}

free(argv0);
// free(argv0);
}

/**
Expand Down

0 comments on commit 09bc428

Please sign in to comment.