Merging r6286 through r6421 from branch releases/1.8 to trunk

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6422 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2022-09-21 20:09:28 +00:00
parent ca7000aea8
commit 88b7bed20f
4 changed files with 15 additions and 14 deletions

View File

@ -374,6 +374,7 @@ Changes in 1.9 (not yet released)
-------------------------- --------------------------
Changes in 1.8.6 Changes in 1.8.6
- Avoid warning about stringop-overflow in string<T>::subString when compiling in release with newer gcc
- Update library zlib to 1.2.11 (from 1.2.8) - Update library zlib to 1.2.11 (from 1.2.8)
- Update library bzip2 to 1.0.8 (from 1.0.6) - Update library bzip2 to 1.0.8 (from 1.0.6)
- Security: Fix buffer overflow caused by malformed md2 files. Thanks @procfs for reporting (https://irrlicht.sourceforge.io/forum/viewtopic.php?f=7&t=52785) - Security: Fix buffer overflow caused by malformed md2 files. Thanks @procfs for reporting (https://irrlicht.sourceforge.io/forum/viewtopic.php?f=7&t=52785)

View File

@ -42,7 +42,7 @@ public:
/* /*
Always return false by default. If you return true you tell the engine Always return false by default. If you return true you tell the engine
that you handled this event completely and the Irrlicht should not that you handled this event completely and the Irrlicht should not
process it any further. So for example if you return true for all process it any further. So for example if you return true for all
EET_KEY_INPUT_EVENT events then Irrlicht would not pass on key-events EET_KEY_INPUT_EVENT events then Irrlicht would not pass on key-events
to it's GUI system. to it's GUI system.
*/ */
@ -54,7 +54,7 @@ public:
{ {
return KeyIsDown[keyCode]; return KeyIsDown[keyCode];
} }
MyEventReceiver() MyEventReceiver()
{ {
for (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i) for (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i)
@ -71,7 +71,7 @@ private:
The event receiver for keeping the pressed keys is ready, the actual responses The event receiver for keeping the pressed keys is ready, the actual responses
will be made inside the render loop, right before drawing the scene. So lets will be made inside the render loop, right before drawing the scene. So lets
create an irr::IrrlichtDevice and the scene node we want to move. We also create an irr::IrrlichtDevice and the scene node we want to move. We also
create some additional scene nodes to show different possibilities to move and create some additional scene nodes to show different possibilities to move and
animate scene nodes. animate scene nodes.
*/ */
int main() int main()
@ -82,7 +82,7 @@ int main()
return 1; return 1;
/* /*
Create the event receiver. Take care that the pointer to it has to Create the event receiver. Take care that the pointer to it has to
stay valid as long as the IrrlichtDevice uses it. Event receivers are not stay valid as long as the IrrlichtDevice uses it. Event receivers are not
reference counted. reference counted.
*/ */
@ -139,7 +139,7 @@ int main()
} }
/* /*
The last scene node we add is a b3d model of a walking ninja. Is shows the The last scene node we add is a b3d model of a walking ninja. Is shows the
use of a 'fly straight' animator to move the node between two points. use of a 'fly straight' animator to move the node between two points.
*/ */
scene::IAnimatedMeshSceneNode* ninjaNode = scene::IAnimatedMeshSceneNode* ninjaNode =
@ -196,7 +196,7 @@ int main()
core::position2d<s32>(10,20)); core::position2d<s32>(10,20));
/* /*
Lets draw the scene and also write the current frames per second and the Lets draw the scene and also write the current frames per second and the
name of the driver to the caption of the window. name of the driver to the caption of the window.
*/ */
int lastFPS = -1; int lastFPS = -1;
@ -259,7 +259,7 @@ int main()
In the end, delete the Irrlicht device. In the end, delete the Irrlicht device.
*/ */
device->drop(); device->drop();
return 0; return 0;
} }

View File

@ -947,13 +947,13 @@ public:
\param make_lower copy only lower case */ \param make_lower copy only lower case */
string<T> subString(u32 begin, s32 length, bool make_lower = false ) const string<T> subString(u32 begin, s32 length, bool make_lower = false ) const
{ {
// clamp length to maximal value
if ((length+begin) > size())
length = size()-begin;
// if start after string // if start after string
// or no proper substring length // or no proper substring length
if ((length <= 0) || (begin>=size())) if ((length <= 0) || (begin>=size()))
return string<T>(""); return string<T>("");
// clamp length to maximal value
if ((length+begin) > size())
length = size()-begin;
string<T> o; string<T> o;
o.reserve(length+1); o.reserve(length+1);

View File

@ -1,4 +1,4 @@
Tests finished. 72 tests of 72 passed. Tests finished. 72 tests of 72 passed.
Compiled as DEBUG Compiled as DEBUG
Test suite pass at GMT Sat May 14 18:16:57 2022 Test suite pass at GMT Thu Sep 15 20:10:06 2022