v2 up fix mav0a201

This commit is contained in:
2018-11-28 21:18:59 +01:00
parent ce599faaf6
commit 27ae1b5ce5
3 changed files with 14 additions and 14 deletions

View File

@@ -480,10 +480,10 @@ class AutomaticDispose {
var JailDistance = 0;
var JailTax = 0;
let m;
while ((m = JailRegEx.exec(JailText)) !== null) {
while ((m = that.JailRegEx.exec(JailText)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
if (m.index === JailRegEx.lastIndex) {
JailRegEx.lastIndex++;
if (m.index === that.JailRegEx.lastIndex) {
that.JailRegEx.lastIndex++;
}
// The result can be accessed through the `m`-variable.
@@ -545,10 +545,10 @@ class AutomaticDispose {
var JailDistance = 0;
var JailTax = 0;
let m;
while ((m = JailRegEx.exec(JailText)) !== null) {
while ((m = that.JailRegEx.exec(JailText)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
if (m.index === JailRegEx.lastIndex) {
JailRegEx.lastIndex++;
if (m.index === that.JailRegEx.lastIndex) {
that.JailRegEx.lastIndex++;
}
// The result can be accessed through the `m`-variable.