diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-02-14 21:39:56 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-02-14 21:39:56 +0100 |
commit | 38b8ece52e74eaefacfeba4081b9c1fd041f7312 (patch) | |
tree | 8951bbef677bb0904ae90d88a719e3e88f2b1ee4 /vala | |
parent | unsigned shift fix (cannot read from stdin) (diff) | |
download | sha3sum-38b8ece52e74eaefacfeba4081b9c1fd041f7312.tar.gz sha3sum-38b8ece52e74eaefacfeba4081b9c1fd041f7312.tar.bz2 sha3sum-38b8ece52e74eaefacfeba4081b9c1fd041f7312.tar.xz |
I hate Vala. Seriously! (Happy Hearts and Hooves Day!)
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'vala')
-rw-r--r-- | vala/sha3sum.vala | 10 |
1 files 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! */ + |