Fixed size issue with SWGList resetAll

This commit is contained in:
Treeku
2014-07-03 02:30:26 +01:00
parent 70024c4dbc
commit 8d05655c89
+8 -2
View File
@@ -317,7 +317,7 @@ public class SWGList<E> implements List<E>, Serializable {
public boolean set(List<E> list) {
synchronized(objectMutex) {
byte[] newListData = { 0x03 };
byte[] newListData = { };
if (!list.isEmpty()) {
for (E element : list) {
@@ -331,9 +331,15 @@ public class SWGList<E> implements List<E>, Serializable {
}
}
IoBuffer buffer = Delta.createBuffer(3 + newListData.length);
buffer.put((byte) 3);
buffer.put((short) list.size());
buffer.put(newListData);
newListData = buffer.array();
this.list = list;
updateCounter++;
updateCounter += list.size();
queue(newListData);
return true;