Merge branch 'development' into EngineAPI-Refactor

This commit is contained in:
Areloch 2018-12-09 14:48:50 -06:00 committed by GitHub
commit 3a71c75596
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1937 changed files with 102332 additions and 70549 deletions

View file

@ -672,13 +672,13 @@ DefineEngineFunction( strreplace, const char*, ( const char* source, const char*
U32 dstp = 0;
for(;;)
{
const char *scan = dStrstr(source + scanp, from);
if(!scan)
const char *subScan = dStrstr(source + scanp, from);
if(!subScan)
{
dStrcpy(ret + dstp, source + scanp, retLen - dstp);
return ret;
}
U32 len = scan - (source + scanp);
U32 len = subScan - (source + scanp);
dStrncpy(ret + dstp, source + scanp, getMin(len, retLen - dstp));
dstp += len;
dStrcpy(ret + dstp, to, retLen - dstp);