Chinese online game developer Shanda Games Ltd said one of its online games was hacked earlier this month, and it had to close about 5,000 accounts that had taken advantage of a design flaw.

Shanda, which became aware of the flaw in its Legend of Immortals online game, said it corrected the flaw within 24 hours.

Accounts using robot programs were able to exploit the flaw by repeatedly performing the same quest and obtain virtual gold coins for free for use in the game, and caused temporary inflation in the in-game economy in certain servers, the company said in a statement.

Shanda is the latest in a growing list of companies that have suffered cyber attacks, including Citigroup Inc, Sony, Google Inc and Lockheed Martin.

Shares of the company were trading slightly down at $6.32 on Friday morning on Nasdaq.

(Reporting by A. Ananthalakshmi in Bangalore; Editing by Roshni Menon)