Skip to content

Commit b61202a

Browse files
authored
Merge pull request #249 from magiblot/uninitialized-values
Fix some uninitialized values
2 parents d94c1d4 + e378fd6 commit b61202a

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

avs_core/core/PluginManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ void PluginManager::AddAutoloadDir(const std::string &dirPath, bool toFront)
570570
GetModuleFileName(NULL, ExeFilePath, AVS_MAX_PATH);
571571
#else // AVS_POSIX
572572
std::string ExeFilePath;
573-
char buf[PATH_MAX + 1];
573+
char buf[PATH_MAX + 1] {};
574574
#ifdef AVS_LINUX
575575
if (readlink("/proc/self/exe", buf, sizeof(buf) - 1) != -1)
576576
#elif defined(AVS_MACOS)

avs_core/core/avisynth.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2222,7 +2222,9 @@ ScriptEnvironment::ScriptEnvironment()
22222222
FrontCache(NULL),
22232223
nTotalThreads(1),
22242224
nMaxFilterInstances(1),
2225-
graphAnalysisEnable(false)
2225+
graphAnalysisEnable(false),
2226+
LogLevel(LOGLEVEL_NONE),
2227+
cacheMode(CACHE_DEFAULT)
22262228
{
22272229
#ifdef XP_TLS
22282230
if(dwTlsIndex == 0)
@@ -2257,8 +2259,6 @@ ScriptEnvironment::ScriptEnvironment()
22572259
}
22582260
#endif
22592261

2260-
2261-
22622262
auto cpuDevice = Devices->GetCPUDevice();
22632263
threadEnv->GetTLS()->currentDevice = cpuDevice;
22642264

avs_core/core/parser/tokenizer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Tokenizer::Tokenizer(Tokenizer* old)
6464
{
6565
pc = old->pc;
6666
line = old->line;
67+
type = old->type;
6768
NextToken();
6869
}
6970

0 commit comments

Comments
 (0)