Skip to content

Commit

Permalink
Teambuilder: Fix endless loop when packing teams (smogon#2285)
Browse files Browse the repository at this point in the history
  • Loading branch information
swordfishtr authored and shrianshChari committed Oct 8, 2024
1 parent 8fff8b5 commit e088b00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion play.pokemonshowdown.com/js/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e088b00

Please sign in to comment.