From a790b163ee46a5b2e57908f3e21fa8e5f827a753 Mon Sep 17 00:00:00 2001 From: engineer_apple Date: Sat, 22 Feb 2020 22:09:48 +0000 Subject: [PATCH] remove source warnings git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6092 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/COSOperator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Irrlicht/COSOperator.cpp b/source/Irrlicht/COSOperator.cpp index f4252b80..d777bad9 100644 --- a/source/Irrlicht/COSOperator.cpp +++ b/source/Irrlicht/COSOperator.cpp @@ -185,7 +185,8 @@ bool COSOperator::getProcessorSpeedMHz(u32* MHz) const if (file) { char buffer[1024]; - (void)fread(buffer, 1, 1024, file); + size_t r = fread(buffer, 1, 1023, file); + buffer[r] = 0; buffer[1023]=0; core::stringc str(buffer); s32 pos = str.find("cpu MHz");