It'll be fine. It may feel loose, but it won't harm the guitar, and as a temporary measure, means you continue playing. Next time, make sure you have a full set as spares! As others have said the D will feel floppy but will work as a temporary measure.
How do you temporarily fix a broken guitar string?
Unwind the broken string and twist it back through the ball end. Pull the end of the string out a little bit, then stick it through the ball end. Twist the string around itself just a few times to secure it. The ball end portion of the string and the broken end of the string should now be attached together.
Is it bad to leave a guitar with a broken string?
When a string breaks, the change in tension will not damage the guitar, but it will cause all the other strings to go slightly out of tune, so if you continue playing you may want to check the tuning.