From 37dfa98e42f846dc683f5a5f024b334836244c78 Mon Sep 17 00:00:00 2001 From: Gabriel Tofvesson Date: Wed, 9 Oct 2024 03:32:47 +0200 Subject: [PATCH] Fix data-race for istack data in transfer to empty stack --- storage/itemstack.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/itemstack.lua b/storage/itemstack.lua index 867d999..60f0f95 100644 --- a/storage/itemstack.lua +++ b/storage/itemstack.lua @@ -193,8 +193,8 @@ function ItemStack:transferTo(target, count) return false, xfer end - self:_modify(-xfer, self) target:_modify(xfer, self) + self:_modify(-xfer, self) return xfer == count, xfer end