fixed while true loop
parent
e99dec4886
commit
a7cb102640
|
@ -57,11 +57,11 @@ namespace MessageHelper {
|
||||||
let offset = 0;
|
let offset = 0;
|
||||||
if(pattern[found + 1] == ':') {
|
if(pattern[found + 1] == ':') {
|
||||||
offset++; /* the beginning : */
|
offset++; /* the beginning : */
|
||||||
while (pattern[found + 1 + offset] != ':') offset++;
|
while (pattern[found + 1 + offset] != ':' && found + 1 + offset < pattern.length) offset++;
|
||||||
const tag = pattern.substr(found + 2, offset - 1);
|
const tag = pattern.substr(found + 2, offset - 1);
|
||||||
|
|
||||||
offset++; /* the ending : */
|
offset++; /* the ending : */
|
||||||
if(pattern[found + offset + 1] != '}') {
|
if(pattern[found + offset + 1] != '}' && found + 1 + offset < pattern.length) {
|
||||||
found++;
|
found++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue