Revert "optimize for loop"

This reverts commit b303eeab21.
This commit is contained in:
zyxkad 2024-12-21 11:18:32 -07:00
parent b303eeab21
commit b52449ba4b
Failed to generate hash of commit

View file

@ -70,8 +70,8 @@ public class DisplayLinkPeripheral extends SyncedPeripheral<DisplayLinkBlockEnti
} else if (data instanceof Map<?, ?> map) { } else if (data instanceof Map<?, ?> map) {
ObjectLuaTable table = new ObjectLuaTable(map); ObjectLuaTable table = new ObjectLuaTable(map);
bytes = new byte[table.length()]; bytes = new byte[table.length()];
for (int i = 1; i <= bytes.length; i++) { for (int i = 0; i < bytes.length; i++) {
bytes[i] = (byte) (table.getInt(i) & 0xff); bytes[i] = (byte) (table.getInt(i + 1) & 0xff);
} }
} else { } else {
throw LuaValues.badArgumentOf(args, 0, "string or table"); throw LuaValues.badArgumentOf(args, 0, "string or table");