Commit: 58e8423b94062c549d70007d0982015d87294333
Parent: 32726a8459aa56da2a35b8f068784c6bf72f3697
Author: Randy Palamar
Date: Tue, 28 Jan 2025 20:55:42 -0700
w32: fix typos in last commit
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/os_win32.c b/os_win32.c
@@ -163,9 +163,9 @@ os_read_file(Arena *a, char *file, size filesize)
{
s8 result = {0};
- if (BETWEEN(filesize, 0, (size)U32_MAX)) {
+ if (filesize > 0 && filesize <= (size)U32_MAX) {
s8 result = s8alloc(a, filesize);
- iptr h = CreateFileA(fname, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);
+ iptr h = CreateFileA(file, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);
if (h >= 0) {
i32 rlen;
if (!ReadFile(h, result.data, result.len, &rlen, 0) || rlen != result.len) {