Skip to content

Commit

Permalink
try fixing super super weird Windows 10 + plain CMD issue #179
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoVan committed Aug 7, 2024
1 parent e3a2c9b commit 5a07583
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/calm.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,11 @@ const char *get_lib_env() {
if (ori_lib_env == NULL) {
ori_lib_env = "";
}
char *lib_env = malloc(
(strlen(ori_lib_env) + strlen(lib_path) + strlen(path_separator) + 1) *
sizeof(char));
char *lib_env =
malloc((strlen(ori_lib_env) + strlen(lib_path) + strlen(path_separator) +
1024 // I don't know what I'm doing
) *
sizeof(char));
strcpy(lib_env, ori_lib_env);

#if defined _WIN32
Expand Down

0 comments on commit 5a07583

Please sign in to comment.