From 9fe7eabadee3264622384f29ead5d9746348dc97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 6 Mar 2023 23:25:49 +0100 Subject: [PATCH] IniFile: Allow specifying which VFS to load from --- Common/Data/Format/IniFile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/Data/Format/IniFile.cpp b/Common/Data/Format/IniFile.cpp index 02bd00d2ef..91c042d5b4 100644 --- a/Common/Data/Format/IniFile.cpp +++ b/Common/Data/Format/IniFile.cpp @@ -582,10 +582,10 @@ bool IniFile::LoadFromVFS(VFSInterface &vfs, const std::string &filename) { bool IniFile::Load(std::istream &in) { // Maximum number of letters in a line static const int MAX_BYTES = 1024*32; + char *templine = new char[MAX_BYTES]; // avoid using up massive stack space while (!(in.eof() || in.fail())) { - char templine[MAX_BYTES]; in.getline(templine, MAX_BYTES); std::string line = templine; @@ -624,6 +624,7 @@ bool IniFile::Load(std::istream &in) { } } + delete[] templine; return true; }