os: fix nreadelements naming
parent
489ec05b23
commit
20e73ff69a
|
@ -98,9 +98,9 @@ pub fn read_bytes(path string) ?[]byte {
|
||||||
C.rewind(fp)
|
C.rewind(fp)
|
||||||
|
|
||||||
mut res := [`0`].repeat(fsize)
|
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)
|
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.
|
// read_file reads the file in `path` and returns the contents.
|
||||||
|
|
Loading…
Reference in New Issue