cache: script: use linkedhashmap for switch map
The switch maps are iterated in the assembler and disassembler and the generated code depends on the iteration order
This commit is contained in:
@@ -26,6 +26,7 @@ package net.runelite.cache.script.assembler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -267,7 +268,7 @@ public class ScriptWriter extends rs2asmBaseListener
|
||||
continue;
|
||||
}
|
||||
|
||||
Map<Integer, Integer> map = maps[index++] = new HashMap<>();
|
||||
Map<Integer, Integer> map = maps[index++] = new LinkedHashMap<>();
|
||||
|
||||
for (LookupCase scase : lswitch.getCases())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user