diff options
| author | Glenn Rice <glennricster@gmail.com> | 2013-02-02 08:17:44 -0600 |
|---|---|---|
| committer | Glenn Rice <glennricster@gmail.com> | 2013-02-02 08:17:44 -0600 |
| commit | b13b5949054444bcce998a57784f53343a452121 (patch) | |
| tree | e6dc0db4533630a7d65cbe845a6266896b0533d2 /Source/Core/Common/Src/StringUtil.cpp | |
| parent | c8c75dc9a3a9746989dc345838a0f04299154fc8 (diff) | |
| parent | f7fa33f2d618206e6388cc023d17ceb6a04d6af2 (diff) | |
Merge branch 'compiler-warnings'
This shouldn't break anything so I will go ahead and merge it. Disc scrubbing is tested and works. There is a minor change to how the data is read by using the File::IOFile::ReadBytes method instead of directly using fread, but the data read is the same.
Diffstat (limited to 'Source/Core/Common/Src/StringUtil.cpp')
| -rw-r--r-- | Source/Core/Common/Src/StringUtil.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/Common/Src/StringUtil.cpp b/Source/Core/Common/Src/StringUtil.cpp index 664987d350..e5c70b2c6b 100644 --- a/Source/Core/Common/Src/StringUtil.cpp +++ b/Source/Core/Common/Src/StringUtil.cpp @@ -69,7 +69,8 @@ std::string StringFromFormat(const char* format, ...) delete[] buf; #else va_start(args, format); - vasprintf(&buf, format, args); + if (vasprintf(&buf, format, args) < 0) + ERROR_LOG(COMMON, "Unable to allocate memory for string"); va_end(args); std::string temp = buf; |
