Fix bug where bad carriage returns mess up line endings.
This commit is contained in:
parent
3cc5c198b4
commit
7609d19e32
@ -233,7 +233,10 @@ char *pc_readsrc(void *handle,unsigned char *target,int maxchars)
|
|||||||
src->pos++;
|
src->pos++;
|
||||||
if (outptr < outend)
|
if (outptr < outend)
|
||||||
*outptr++ = '\n';
|
*outptr++ = '\n';
|
||||||
}
|
} else {
|
||||||
|
// Replace with \n.
|
||||||
|
*(outptr - 1) = '\n';
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user