From 39363e5419e4fceda1b9d29c499289f0bb654381 Mon Sep 17 00:00:00 2001 From: AnotherCommander Date: Tue, 17 Nov 2015 21:51:46 +0100 Subject: [PATCH] Fixed previous fix. --- src/Core/Scripting/OOJSShip.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Scripting/OOJSShip.m b/src/Core/Scripting/OOJSShip.m index ac40d9ad..0eb1e6c4 100644 --- a/src/Core/Scripting/OOJSShip.m +++ b/src/Core/Scripting/OOJSShip.m @@ -1386,7 +1386,7 @@ static JSBool ShipSetProperty(JSContext *context, JSObject *this, jsid propID, J { iValue = 0; } - if ((OOCargoQuantity)iValue < [entity maxAvailableCargoSpace] - [entity availableCargoSpace]) + else if ((OOCargoQuantity)iValue < [entity maxAvailableCargoSpace] - [entity availableCargoSpace]) { iValue = [entity maxAvailableCargoSpace] - [entity availableCargoSpace]; }