mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
crypto: add custom errors to crypto lib (#9522)
This commit is contained in:
parent
ab6e0ed0b3
commit
70b189d751
5 changed files with 9 additions and 8 deletions
|
@ -23,7 +23,7 @@ pub fn read(bytes_needed int) ?[]byte {
|
|||
rbytes := unsafe { getrandom(batch_size, buffer + bytes_read) }
|
||||
if rbytes == -1 {
|
||||
unsafe { free(buffer) }
|
||||
return read_error
|
||||
return IError(&ReadError{})
|
||||
}
|
||||
bytes_read += rbytes
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue