From cea7e241b0cf93b2e16dd69c1a27bb2e5abd9715 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Thu, 15 Nov 2018 19:42:40 +0100 Subject: [PATCH] Fix for asmjit crash. --- zscript/uthud.zsc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zscript/uthud.zsc b/zscript/uthud.zsc index abd5985..6f80dc4 100644 --- a/zscript/uthud.zsc +++ b/zscript/uthud.zsc @@ -405,6 +405,9 @@ Class UTHud : BaseStatusBar UTDrawPlainTex(WeaponBox,hudsize*weaponsize,opacity+7); } Weapon wslots[10]; + // zero-initialize, fixes asmjit crash + for ( int i=0; i<10; i++ ) + wslots[i] = null; // first run, populate the full array of weapons for ( int i=0; i<10; i++ ) {