From 38b8ece52e74eaefacfeba4081b9c1fd041f7312 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 14 Feb 2013 21:39:56 +0100 Subject: I hate Vala. Seriously! (Happy Hearts and Hooves Day!) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- vala/sha3sum.vala | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vala/sha3sum.vala b/vala/sha3sum.vala index 5e0b792..87ffc30 100644 --- a/vala/sha3sum.vala +++ b/vala/sha3sum.vala @@ -783,7 +783,7 @@ static int main(string[] cmdargs) } string rc = ""; string fn = filename == null ? "/dev/stdin" : filename; - FileStream file = null; + FileStream file = null; try { file = FileStream.open(fn, "r"); @@ -814,14 +814,15 @@ static int main(string[] cmdargs) stdout.flush(); } else - { for (int b = 0, bn = bs.length; b < bn; b++) + { + for (int b = 0, bn = bs.length; b < bn; b++) { rc += HEXADECA[(bs[b] >> 4) & 15]; rc += HEXADECA[bs[b] & 15]; } rc += " " + (filename == null ? "-" : filename) + "\n"; if (filename == null) - stdin_ = (uint8[])(rc.to_utf8); + stdin_ = (uint8[])(rc.to_utf8()); stdout.printf("%s", rc); stdout.flush(); } @@ -840,3 +841,6 @@ static int main(string[] cmdargs) return 0; } + +/* P.S. I utterly hate Vala more than C++ and JavaScript combined. Happy Hearts and Hooves Day! */ + -- cgit v1.2.3-70-g09d2