This is not a true story. There was always a bit of a meme about Gandhi because "haha Gandhi and nukes" but he was no more likely to use them than any other AI. The "integer overflow bug" story was invented by apparently a random person decades later who stuck it in a wiki, and then via citogenesis it spread everywhere.
As the link odyssey7 cited (and which you obviously didn't read) states, there is no proof that any such bug ever existed, with Sid Meier himself denying it. odyssey7 was correct to described it as "rumored".