diff options
| author | la_ninpre <aaoth@aaoth.xyz> | 2026-01-28 13:03:02 +0300 |
|---|---|---|
| committer | la_ninpre <aaoth@aaoth.xyz> | 2026-01-28 13:03:02 +0300 |
| commit | 1c2e3032e76e55883b4ea0add35ba805e16aa7ea (patch) | |
| tree | 5e363312a8c79f50de567bdae6aefd8b16dcc161 /data.c | |
| parent | 16d48e4cd4edc15aa2ffe158d93248b5a57c3ea9 (diff) | |
data: fix checking for a file type
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2668,7 +2668,7 @@ static int _load_raw_file(const char *fn, xs_val **data, int *size, struct stat sb; FILE *f; - if (stat(fn, &sb) == 0 && sb.st_mode & S_IFMT == S_IFREG) { + if (stat(fn, &sb) == 0 && (sb.st_mode&S_IFMT) == S_IFREG) { if ((f = fopen(fn, "rb")) != NULL) { *size = XS_ALL; *data = xs_read(f, size); |