Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ed: runtime error on empty file (#560)
* Fix the assumption in edEdit() that >0 bytes will be read from input file; it might be empty * Error discovered with "perl ed some.txt" then "1r EMPTYFILE" ... Modification of non-creatable array value attempted, subscript -1 at ed line 722. * Follow GNU ed and print the number of characters read (0) * The default calculation of $CurrentLineNum was correct for all cases of insert mode, so use that
- Loading branch information