Fix bug where bad carriage returns mess up line endings.

This commit is contained in:
David Anderson 2014-11-08 18:04:45 -08:00
parent 3cc5c198b4
commit 7609d19e32

View File

@ -233,7 +233,10 @@ char *pc_readsrc(void *handle,unsigned char *target,int maxchars)
src->pos++;
if (outptr < outend)
*outptr++ = '\n';
}
} else {
// Replace with \n.
*(outptr - 1) = '\n';
}
break;
}
}