From bf72b1560340b48fc0958b3b2038ba13d49b7190 Mon Sep 17 00:00:00 2001 From: Luck Date: Tue, 29 May 2018 01:01:30 +0100 Subject: Multiple fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed an issue which prevented links from being “clickable” * Added a /spark alias * Added a max stack depth limit to fix issues with rendering --- common/src/main/java/com/sk89q/warmroast/StackNode.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common/src/main/java/com/sk89q/warmroast') diff --git a/common/src/main/java/com/sk89q/warmroast/StackNode.java b/common/src/main/java/com/sk89q/warmroast/StackNode.java index f077309..8fd0661 100644 --- a/common/src/main/java/com/sk89q/warmroast/StackNode.java +++ b/common/src/main/java/com/sk89q/warmroast/StackNode.java @@ -36,6 +36,8 @@ import java.util.Map; */ public class StackNode implements Comparable { + private static final int MAX_STACK_DEPTH = 300; + /** * The name of this node */ @@ -87,6 +89,10 @@ public class StackNode implements Comparable { private void log(StackTraceElement[] elements, int skip, long time) { accumulateTime(time); + + if (skip >= MAX_STACK_DEPTH) { + return; + } if (elements.length - skip == 0) { return; -- cgit