anchor.diff:    for I := 1 to 4 do
     if (R1[I - 1]) > 0 then
     begin
  -    Id := gRes.Houses[aHouse].SupplyIn[I, Min(R1[I - 1], 5)] + 1;
  +    Count := Min(R1[I - 1], 5);
  +    Id := gRes.Houses[aHouse].SupplyIn[I, Count] + 1;
   
       // Need to swap Coal and Steel for the ArmorSmithy
       // For some reason KaM stores these wares in swapped order, here we fix it (1 <-> 2)
       if (aHouse = ht_ArmorSmithy) and (I in [1,2]) then
  -      Id := gRes.Houses[aHouse].SupplyIn[3-I, Min(R1[I - 1], 5)] + 1;
  +      Id := gRes.Houses[aHouse].SupplyIn[3-I, Count] + 1;
   
       AddHouseSupplySprite(Id);
     end;
  
positive.code:         if (aHouse = ht_ArmorSmithy) and (I in [1,2]) then
            Id := gRes.Houses[aHouse].SupplyOut[3-I, K] + 1;
        end;
      end else
        Id := gRes.Houses[aHouse].SupplyOut[I, Min(R2[I - 1], 5)] + 1;
  
      AddHouseSupplySprite(Id);
    end;
  
negative.code: 
  procedure TRenderPool.AddHouseSupply(aHouse: THouseType; Loc: TKMPoint; const R1, R2: array of Byte; DoImmediateRender: Boolean = False; DoHighlight: Boolean = False; HighlightColor: TColor4 = 0);
  var
    Id, I, K, Count: Integer;
    R: TRXData;
  
    procedure AddHouseSupplySprite(aId: Integer);
  