Просмотр исходного кода

Fix the premature break without copying the remaining string part.

mingodad 12 лет назад
Родитель
Сommit
6c98c4dbe3
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      SquiLu/squirrel/sqbaselib.cpp

+ 1 - 0
SquiLu/squirrel/sqbaselib.cpp

@@ -1415,6 +1415,7 @@ static SQRESULT string_replace(HSQUIRRELVM v) {
             init = init + (s2-(src+init)) + p_size;
             init = init + (s2-(src+init)) + p_size;
             n++;
             n++;
             if(count && (n >= count)) {
             if(count && (n >= count)) {
+                b.Write(src+init, src_size-init);
                 break;
                 break;
             }
             }
         } else {
         } else {