fix failure of getdelim to set stream orientation on error

if EINVAL or ENOMEM happened before the first getc_unlocked, it was
possible that the stream orientation had not yet been set.
1 file changed