Like we needed another excuse to eat that Hershey's bar. Turns out, dark chocolate and other foods high in magnesium could help ward off one of the most dangerous cancers, according to new research.

Researchers at Indiana University say eating foods high in magnesium may lower your risk of developing pancreatic cancer.

In the study, published in the British Journal of Cancer, researchers discovered those who ate less magnesium had a higher risk for developing the cancer. The researchers say age, gender or body mass index didn't alter how the magnesium in the body affected the cancer.

The study's co-author said: "Pancreatic cancer is really unique and different from other cancers. The five-year survival rate is really low, so that makes prevention and identifying risk factors or predictors associated with pancreatic cancer very important."

The American Cancer Society estimates nearly 49,000 people were diagnosed with pancreatic cancer in the U.S. in 2015. It's estimated about 82 percent of those people will die from it. It's the fourth leading cause of cancer-related deaths.

Of course, dark chocolate isn't the only way to up your magnesium intake. EverydayHealth lists dark leafy greens, nuts and seeds, fish, soybeans and more as other great sources.