aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/COSOperator.cpp
diff options
context:
space:
mode:
authorcutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>2020-06-12 20:41:49 +0000
committercutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>2020-06-12 20:41:49 +0000
commit20b3d56987ca7b7a9d7f27b0a32a93f12e8dc530 (patch)
tree5fd7cc45a44c46b1134788ed90ffb70398179f4d /source/Irrlicht/COSOperator.cpp
parent084e0e669a8d9c6a373ff3bcb410febca4d4a48a (diff)
downloadirrlicht-20b3d56987ca7b7a9d7f27b0a32a93f12e8dc530.tar.xz
Merging r6075 through r6106 from trunk to ogl-es branch.
Burnings renderer changes. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6116 dfc29bdd-3216-0410-991c-e03cc46cb475
Diffstat (limited to 'source/Irrlicht/COSOperator.cpp')
-rw-r--r--source/Irrlicht/COSOperator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/Irrlicht/COSOperator.cpp b/source/Irrlicht/COSOperator.cpp
index 1bdbdc1..6cef827 100644
--- a/source/Irrlicht/COSOperator.cpp
+++ b/source/Irrlicht/COSOperator.cpp
@@ -187,7 +187,8 @@ bool COSOperator::getProcessorSpeedMHz(u32* MHz) const
if (file)
{
char buffer[1024];
- 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");