From 2a8efb3fd53409acf23e8610ddc024f374868267 Mon Sep 17 00:00:00 2001 From: SquidDev Date: Sun, 21 Jun 2020 12:03:24 +0100 Subject: [PATCH] Fix crashes when rendering monitors of varying sizes When calling .flip(), we limit the size of the buffer. However, this limit is not reset when writing the next time, which means we get out-of-bounds errors, even if the buffer is /technically/ big enough. Clearing the buffer before drawing (rather than just resetting the position) is enough to fix this. Fixes #476 (and closes #477, which is a duplicate) --- gradle.properties | 2 +- .../client/render/TileEntityMonitorRenderer.java | 2 +- .../assets/computercraft/lua/rom/help/changelog.txt | 4 ++++ .../assets/computercraft/lua/rom/help/whatsnew.txt | 9 ++------- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3fe94fba4..f71c4f6e1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Mod properties -mod_version=1.89.0 +mod_version=1.89.1 # Minecraft properties mc_version=1.12.2 diff --git a/src/main/java/dan200/computercraft/client/render/TileEntityMonitorRenderer.java b/src/main/java/dan200/computercraft/client/render/TileEntityMonitorRenderer.java index 7dd003152..9e4620574 100644 --- a/src/main/java/dan200/computercraft/client/render/TileEntityMonitorRenderer.java +++ b/src/main/java/dan200/computercraft/client/render/TileEntityMonitorRenderer.java @@ -170,7 +170,7 @@ public class TileEntityMonitorRenderer extends TileEntitySpecialRenderer