diff options
| author | IllusionMan1212 <hisham.abourgheba@gmail.com> | 2025-04-04 05:14:52 +0200 |
|---|---|---|
| committer | IllusionMan1212 <hisham.abourgheba@gmail.com> | 2025-04-04 05:14:52 +0200 |
| commit | 7d041cb2b8ae54f25086a52da62cecf2db254553 (patch) | |
| tree | b36ca387b66c175d0f6d3d76c031bd5d957ef984 /src | |
| parent | 1a91aa0d437275b35d64f8f0ae09740e61b907df (diff) | |
fix: prevent segfault by initializing cwd to nullptr
Diffstat (limited to 'src')
| -rw-r--r-- | src/path.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/path.cpp b/src/path.cpp index 12f8d3d4e..d5e982088 100644 --- a/src/path.cpp +++ b/src/path.cpp @@ -81,7 +81,7 @@ String get_working_directory(gbAllocator allocator) { auto buf = array_make<char>(temporary_allocator()); size_t size = PATH_MAX; - char const *cwd; + char const *cwd = nullptr; for (; cwd == nullptr; size *= 2) { array_resize(&buf, size); |