Restricted-source, take this!
JavaScript (ES6), 46 bytes
Saved 6 bytes thanks to @Neil
Expects (D)(c), where D is a string of digits and c is an integer.

D=&gt;c=&gt;eval(`for(;/[^${D}]/.test(c);)c+=256;c`)

Try it online!