From ba11df71eb054d15ec5d05d7ad67eb24a78f8ec7 Mon Sep 17 00:00:00 2001 From: Argent77 Date: Sun, 16 Apr 2017 13:53:36 +0200 Subject: [PATCH] Fixed a bug in script compiler that assigned wrong id to TriggerOverride function definition for BG2+TobEx --- src/org/infinity/resource/bcs/ScriptInfo.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/org/infinity/resource/bcs/ScriptInfo.java b/src/org/infinity/resource/bcs/ScriptInfo.java index 993927469..30f782398 100644 --- a/src/org/infinity/resource/bcs/ScriptInfo.java +++ b/src/org/infinity/resource/bcs/ScriptInfo.java @@ -509,7 +509,12 @@ protected ScriptInfo(ScriptInfo obj, String[] objectSpecifierIds) this((objectSpecifierIds != null) ? objectSpecifierIds : obj.OBJECT_SPECIFIER_IDS, obj.SCOPES); this.FUNCTION_RESTYPE.putAll(obj.FUNCTION_RESTYPE); this.FUNCTION_CONCAT.putAll(obj.FUNCTION_CONCAT); - this.FUNCTION_SIGNATURES.putAll(obj.FUNCTION_SIGNATURES); + for (final Function.FunctionType ft: obj.FUNCTION_SIGNATURES.keySet()) { + List oldList = obj.FUNCTION_SIGNATURES.get(ft); + if (oldList != null) { + this.FUNCTION_SIGNATURES.put(ft, new ArrayList(oldList)); + } + } } /** Returns object specifier IDS resource names. */