diff options
author | Case Duckworth | 2022-07-27 15:40:52 -0500 |
---|---|---|
committer | Case Duckworth | 2022-07-27 15:40:52 -0500 |
commit | 3a97dd1cfcebeb6e8cc2f6b2966fe5af415da265 (patch) | |
tree | 817348d02cb2eb1d2ee1fb85a14e8a48eefd2844 | |
parent | Initial commit (diff) | |
download | shin-3a97dd1cfcebeb6e8cc2f6b2966fe5af415da265.tar.gz shin-3a97dd1cfcebeb6e8cc2f6b2966fe5af415da265.zip |
Detect getline() errors
-rwxr-xr-x | shin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shin b/shin index b966091..9ba488b 100755 --- a/shin +++ b/shin | |||
@@ -12,7 +12,7 @@ FNR == 1 { outfile = FILENAME; sub(/in$/, "", outfile) } | |||
12 | { print($0) > outfile } | 12 | { print($0) > outfile } |
13 | /^#</ { | 13 | /^#</ { |
14 | inclfile = shin_resolve(substr($0, 3)) | 14 | inclfile = shin_resolve(substr($0, 3)) |
15 | while (getline l < inclfile) print(l) > outfile | 15 | while ((getline l < inclfile) > 0) print(l) > outfile |
16 | close(inclfile) | 16 | close(inclfile) |
17 | sub(/</, ">", $0) | 17 | sub(/</, ">", $0) |
18 | print > outfile | 18 | print > outfile |