1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: fix nreadelements naming

This commit is contained in:
Abdullah Atta 2019-12-18 10:22:52 +05:00 committed by Alexander Medvednikov
parent 489ec05b23
commit 20e73ff69a

View File

@ -98,9 +98,9 @@ pub fn read_bytes(path string) ?[]byte {
C.rewind(fp)
mut res := [`0`].repeat(fsize)
nreadelements := C.fread(res.data, fsize, 1, fp)
nr_read_elements := C.fread(res.data, fsize, 1, fp)
C.fclose(fp)
return res[0..nreadelements * fsize]
return res[0..nr_read_elements * fsize]
}
// read_file reads the file in `path` and returns the contents.