diff options
Diffstat (limited to 'source/Irrlicht/COSOperator.cpp')
-rw-r--r-- | source/Irrlicht/COSOperator.cpp | 3 |
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");
|