Commit 19dd5282 authored by cutealien's avatar cutealien

Fix bug in string::replace found and patched by Nalin.

See https://sourceforge.net/tracker/?func=detail&aid=2997065&group_id=74339&atid=540676


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3286 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 95c18786
...@@ -481,6 +481,12 @@ public: ...@@ -481,6 +481,12 @@ public:
return used-1; return used-1;
} }
//! Informs if the string is empty or not.
//! \return True if the string is empty, false if not.
bool empty() const
{
return (size() == 0);
}
//! Returns character string //! Returns character string
/** \return pointer to C-style NUL terminated string. */ /** \return pointer to C-style NUL terminated string. */
...@@ -1055,7 +1061,7 @@ public: ...@@ -1055,7 +1061,7 @@ public:
// No match found, just copy characters. // No match found, just copy characters.
array[i] = array[pos]; array[i] = array[pos];
} }
array[i] = 0; array[i-1] = 0;
used = i; used = i;
return *this; return *this;
......
...@@ -191,6 +191,10 @@ ...@@ -191,6 +191,10 @@
RelativePath=".\collisionResponseAnimator.cpp" RelativePath=".\collisionResponseAnimator.cpp"
> >
</File> </File>
<File
RelativePath=".\color.cpp"
>
</File>
<File <File
RelativePath=".\cursorSetVisible.cpp" RelativePath=".\cursorSetVisible.cpp"
> >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment