From b84800e369887115aaba407630375f94b2be0908 Mon Sep 17 00:00:00 2001 From: Drahflow Date: Wed, 7 Jan 2015 22:22:46 +0100 Subject: Correctly handle last line without newline --- compiler/standardClient.ey | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/standardClient.ey b/compiler/standardClient.ey index c842b84..6df429c 100644 --- a/compiler/standardClient.ey +++ b/compiler/standardClient.ey @@ -453,8 +453,8 @@ } /writeall deff { =*f "" ==buffer { - buffer 4096 read cat =buffer - buffer "" eq not + buffer 4096 read -010 cat =buffer + "" eq not } { buffer "\n" str .split ==lines 0 lines len 1 sub range { @@ -462,6 +462,10 @@ } each lines len 1 sub lines * =buffer } loop + + buffer "" eq not { + buffer "\n" str .split |f each + } rep } /eachLine deff > > -- } /makefile deff -- cgit v1.2.3