Skip to content

Commit

Permalink
fix evidebce off by one again
Browse files Browse the repository at this point in the history
  • Loading branch information
stonedDiscord committed Aug 12, 2024
1 parent 77f47ce commit 1a32ea5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webAO/packets/handlers/handleLE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { prepChat, safeTags } from '../../encoding';
export const handleLE = (args: string[]) => {
client.evidences = [];
for (let i = 1; i < args.length; i++) {
if (!args[i].includes("&"))
break;
const arg = args[i].split("&");
client.evidences[i - 1] = {
name: prepChat(arg[0]),
Expand All @@ -22,7 +24,7 @@ export const handleLE = (args: string[]) => {

const evidence_box = document.getElementById("evidences");
evidence_box.innerHTML = "";
for (let i = 0; i <= client.evidences.length; i++) {
for (let i = 0; i <= client.evidences.length-1; i++) {
const evi_item = new Image();
evi_item.id = "evi_"+i;
evi_item.className = "evi_icon"
Expand Down

0 comments on commit 1a32ea5

Please sign in to comment.