We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44e09c5 commit 11a9478Copy full SHA for 11a9478
src/core/s-ops.c
@@ -458,10 +458,11 @@ static REBYTE seed_str[SEED_LEN] = {
458
// Add missing CRs:
459
while (cnt > 0) {
460
bp[tail--] = bp[len]; // Copy src to dst.
461
- if (bp[len--] == LF && bp[len] != CR) {
+ if (bp[len] == LF && (len == 0 || bp[len - 1] != CR)) {
462
bp[tail--] = CR;
463
cnt--;
464
}
465
+ len--;
466
467
468
@@ -495,10 +496,11 @@ static REBYTE seed_str[SEED_LEN] = {
495
496
497
498
499
+ if (bp[len] == LF && (len == 0 || bp[len] != CR)) {
500
501
502
503
504
505
506
0 commit comments