Corrected a problem with strmid()
parent
fa67e815b8
commit
55b4e73a7a
|
@ -306,6 +306,8 @@ CBotString CBotString::Mid(int start, int lg)
|
||||||
{
|
{
|
||||||
CBotString res;
|
CBotString res;
|
||||||
|
|
||||||
|
if (lg == -1) lg = 2000;
|
||||||
|
|
||||||
// clamp start to correct value
|
// clamp start to correct value
|
||||||
if (start < 0) start = 0;
|
if (start < 0) start = 0;
|
||||||
if (start >= m_lg) return res;
|
if (start >= m_lg) return res;
|
||||||
|
|
Loading…
Reference in New Issue