anchor.diff:  begin
     Result := Min(aCnt, fMarketResOut[aWare]);
   
  -  if Result = 0 then Exit;
  +  if Result <= 0 then Exit; // aCnt could be negative
   
     //No need to call SetRes functins here, since its just moving resource from Out to In
     Dec(fMarketResOut[aWare], Result);
  
positive.code:   ordersAllowed := MAX_RES_ORDERED - fMarketDeliveryCount[fResFrom];
  
    Assert(ordersAllowed >= 0); //We must never have ordered more than we are allowed
  
    //Order as many as we can within our limit
    if (resRequired > 0) and (ordersAllowed > 0) then
  
negative.code: begin
    aCnt := Min(aCnt, fMarketResIn[aWare]);
  
    if aCnt <= 0 then Exit; // aCnt could be negative
  
    //No need to call SetRes functins here, since its just moving resource from In to Out
    Inc(fMarketResOut[aWare], aCnt);
  