From b057750b1fb942aa5b95f9400800c6e7ba2350d6 Mon Sep 17 00:00:00 2001 From: demir <46607042+swordfishtr@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:16:20 +0300 Subject: [PATCH] Fixed a case of endless loop --- play.pokemonshowdown.com/js/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/play.pokemonshowdown.com/js/storage.js b/play.pokemonshowdown.com/js/storage.js index 3eeaa4e332..8ca36a79bf 100644 --- a/play.pokemonshowdown.com/js/storage.js +++ b/play.pokemonshowdown.com/js/storage.js @@ -1107,7 +1107,7 @@ Storage.unpackTeam = function (buf) { set.dynamaxLevel = (misc[4] ? Number(misc[4]) : 10); set.teraType = misc[5]; } - if (j < 0) break; + if (j < 0 || buf.indexOf('|', j) < 0) break; i = j + 1; }