Skip to content

Commit

Permalink
refactor: initialize bufferSize on declaration
Browse files Browse the repository at this point in the history
Co-authored-by: Jack <[email protected]>
  • Loading branch information
Alystrasz and ASpoonPlaysGames committed Sep 24, 2023
1 parent 7b38a4b commit 99127c1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions NorthstarDLL/mods/autodownload/moddownloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ void ModDownloader::ExtractMod(fs::path modPath)
}

// Create file
int bufferSize;
int bufferSize = 8192;
void* buffer;
int err = UNZ_OK;
FILE* fout = NULL;
Expand All @@ -380,7 +380,6 @@ void ModDownloader::ExtractMod(fs::path modPath)
}

// Allocate memory for buffer
bufferSize = 8192;
buffer = (void*)malloc(bufferSize);
if (buffer == NULL)
{
Expand Down

0 comments on commit 99127c1

Please sign in to comment.