Browse Source
If we read the maximum size of our buffer into $buf, and the last character is '\015', there's a chance that the character is '\012', which means our regex won't work correctly. At the worst case, this could introduce an extra newline into the code. We'll now read an extra character if we see '\015' is the last character in $buf. We also forgot to recalculate the length of $buf after doing the newline substitution, causing some files to appeare truncated. We'll do that now and force byte semantics in length() for good measure. Signed-off-by: Eric Wong <normalperson@yhbt.net>maint
Eric Wong
19 years ago
1 changed files with 11 additions and 4 deletions
Loading…
Reference in new issue