From a2629207350dbad42251431e58bace2ff333d613 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Wed, 17 Apr 2024 20:47:59 -0600 Subject: Fix bugs in dereferencing, minor code cleanup --- boil/library/TypeFactory.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'boil/library/TypeFactory.java') diff --git a/boil/library/TypeFactory.java b/boil/library/TypeFactory.java index 8c64101..93966f0 100644 --- a/boil/library/TypeFactory.java +++ b/boil/library/TypeFactory.java @@ -32,11 +32,13 @@ public class TypeFactory { * list of the x most recent entries. */ String rtn = ""; - rtn += String.format("t.%d", - type_num-x); - for (int i = type_num-(x-1); i < type_num; ++i) { - rtn += String.format(" t.%d", - i); + if (x > 0) { + rtn += String.format("t.%d", + type_num-x); + for (int i = type_num-(x-1); i < type_num; ++i) { + rtn += String.format(" t.%d", + i); + } } return rtn; -- cgit v1.2.3