All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
What we learned from the Maliki School is that the emission of Madhi nullifies the fasting if the fasting person deliberately emits it, or that it was emitted accompanied by pleasure, but if the emission was not deliberate, or it was not for a habitual pleasure, then it does not nullify the fasting.
Hashiyat Ad-Dasooqi ‘ala As-Sharh Al-Kabeer when highlighting that Madhi affects the fasting if it was emitted accompanied by a habitual pleasure, reads: (No [it does not invalidate fasting] if it was emitted without any pleasure, or it was emitted accompanied by pleasure but not habitual, then it does not nullify the fasting.” [End of quote]
Accordingly, if Madhi was emitted unintentionally, and was not due to habitual pleasure, then your fast is valid, and you do not have to make up for it based on what was mentioned in Al-Maliki books.
Assuming that the emission of Madhi nullifies your fasting, and you were not aware of the number of days that you must make up, then you continue to make up until you think that you most likely covered those days and are acquitted from sin.
Moreover, the opinion of many scholars is that Madhi does not nullify the fasting, and it is permissible for you to follow this saying, for the common person is permitted to follow a scholar whom he/she trusts, and it is not obligatory to follow a particular school of jurisprudence.
Allah knows best.