# HG changeset patch # User Paul Boddie # Date 1716152191 -7200 # Node ID 2df62f615d0c765f0e863b16e7b3465b2f069624 # Parent 4da5e97181b6eaef7f6778a48b13198a02e7f9ae Avoid creating zero-length temporary arrays. diff -r 4da5e97181b6 -r 2df62f615d0c translator.py --- a/translator.py Sun May 19 22:54:42 2024 +0200 +++ b/translator.py Sun May 19 22:56:31 2024 +0200 @@ -2293,10 +2293,10 @@ if self.uses_temp(name, "__tmp_values") and self.max_accessor_index: self.writeline("__attr __tmp_values[%d];" % self.max_accessor_index) - if self.uses_temp(name, "__tmp_attr_refs"): + if self.uses_temp(name, "__tmp_attr_refs") and self.max_attribute_ref_index: self.writeline("__attr *__tmp_attr_refs[%d];" % self.max_attribute_ref_index) - if self.uses_temp(name, "__tmp_results"): + if self.uses_temp(name, "__tmp_results") and self.max_result_target: self.writeline("__attr __tmp_results[%d] = {0};" % self.max_result_target) if self.uses_temp(name, "__tmp_private_context"):