Sounds like the famous Gandhi bug in Civilisation:
https://en.wikipedia.org/wiki/Nuclear_Gandhi
edit: turns out this was a fabrication, good thing I read my cited source!
"On September 8, 2020, Sid Meier's autobiography, Sid Meier's Memoir!: A Life in Computer Games, was released, containing confirmation that the Gandhi software bug was fabricated and a detailed background of the urban legend's formation"
from the above link