Old Testament readings use the Septuagint , the Scripture the apostles quoted. Masoretic numbering shown for reference.Learn why
LXX

Genesis 40:5

And they both had a dream in one night; and the vision of the dream of the chief cupbearer and chief baker, who belonged to the king of Egypt, who were in the prison, was this.

Read in other translations