Prison's officially off the table for Charles Oakley in his casino cheating case -- but he ain't outta the woods just yet.
TMZ Sports broke the story ... the ex-NBA star was arrested at the Cosmopolitan in Vegas on July 8 after officials say he changed his bet after the outcome of the game was known.
Our sources have told us Oakley pulled a $100 chip back after he realized he was going to lose.
Oakley was initially charged with attempting to commit a fraudulent act in a gaming establishment -- and faced up to 6 years in prison if convicted.