From e088b00c41e4de6bbec6b24dd75ed303af5adf59 Mon Sep 17 00:00:00 2001 From: demir <46607042+swordfishtr@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:28:50 +0300 Subject: [PATCH] Teambuilder: Fix endless loop when packing teams (#2285) --- 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; }