fixed while true loop

canary
WolverinDEV 2019-04-24 11:54:19 +02:00
parent e99dec4886
commit a7cb102640
1 changed files with 2 additions and 2 deletions

View File

@ -57,11 +57,11 @@ namespace MessageHelper {
let offset = 0;
if(pattern[found + 1] == ':') {
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);
offset++; /* the ending : */
if(pattern[found + offset + 1] != '}') {
if(pattern[found + offset + 1] != '}' && found + 1 + offset < pattern.length) {
found++;
continue;
}