Index Error

i was trying to create a console for when you connect to my game. here i have the script consolemanager:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ConsoleManager : MonoBehaviour
{
    public Text[] lines;
    List<string> content = new List<string>();
    void Awake()
    {
        lines = GetComponentsInChildren<Text>();
    }
    void UpdateConsole()
    {
        for(int i = 0; i < lines.Length - 1; i++)
        {
            int li = (lines.Length - 1) - i;
            int ci = (content.Capacity - 2) - i;
            if(ci > -1){lines[li].text = content[ci];print("done one line")}

        }
    }
    public void WriteToConsole(string message)
    {
        content.Add(message);
        UpdateConsole();
    }
}

i am getting an index out of range error inside UpdateConsole() when i trigger it via WriteToConsole(). it points to line 22 which is the closing bracket for the function UpdateConsole(). so i’m extremely confused about what it even is having an issue with. i have not seen “done one line” printed at all in the unity editor console, neither have i seen any of the lines updated. i checked and there are 12 lines in the list as expected after Awake() is called. sorry if i’m doing/missing something really obvious, and i’m happy to answer any questions (of course) i have tried changing capacity - 2 to -1 as well, to no effect.

nevermind, i switched to content.Count instead and it’s fine. idk where i heard .Capacity was good lol