They Went That-A-Way & That-A-Way (1978)

Comedy

Dewey and Wallace are small-town lawmen who are ordered by the governor to go undercover as prison inmates to find out where a gang of thieves have hidden their loot. While they're undercover, however, the governor dies, and because no one else knows about the ruse Dewey and Wallace are stranded in prison.