diff options
| author | Charles.Forsyth <devnull@localhost> | 2007-07-14 10:41:18 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2007-07-14 10:41:18 +0000 |
| commit | a6011949be081a8fe1bec0713ce60c36beb3a351 (patch) | |
| tree | 0855fa75f38a7361a9b7a9fe12608bd99761add0 /appl/lib/auth9.b | |
| parent | d42218ac2785e9e4bea53ec499f563cab5747959 (diff) | |
20070714-1142
Diffstat (limited to 'appl/lib/auth9.b')
| -rw-r--r-- | appl/lib/auth9.b | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/appl/lib/auth9.b b/appl/lib/auth9.b index 06accb53..d9f38c71 100644 --- a/appl/lib/auth9.b +++ b/appl/lib/auth9.b @@ -288,12 +288,8 @@ decrypt(key: array of byte, data: array of byte, n: int) readn(fd: ref Sys->FD, nb: int): array of byte { buf:= array[nb] of byte; - for(n:=0; n<nb;){ - m := sys->read(fd, buf[n:], nb-n); - if(m <= 0) - return nil; - n += m; - } + if(sys->readn(fd, buf, nb) != nb) + return nil; return buf; } |
