aboutsummaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorla_ninpre <aaoth@aaoth.xyz>2026-01-28 13:03:02 +0300
committerla_ninpre <aaoth@aaoth.xyz>2026-01-28 13:03:02 +0300
commit1c2e3032e76e55883b4ea0add35ba805e16aa7ea (patch)
tree5e363312a8c79f50de567bdae6aefd8b16dcc161 /data.c
parent16d48e4cd4edc15aa2ffe158d93248b5a57c3ea9 (diff)
data: fix checking for a file type
Diffstat (limited to 'data.c')
-rw-r--r--data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/data.c b/data.c
index 85bc401..31eafeb 100644
--- a/data.c
+++ b/data.c
@@ -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);