Ensure BLI_stat() return value is checked.
also add function attrs on BLI_fileops to ensure they're used correctly.
This commit is contained in:
@@ -376,7 +376,7 @@ int checkPackedFile(const char *filename, PackedFile *pf)
|
||||
BLI_strncpy(name, filename, sizeof(name));
|
||||
BLI_path_abs(name, G.main->name);
|
||||
|
||||
if (BLI_stat(name, &st)) {
|
||||
if (BLI_stat(name, &st) == -1) {
|
||||
ret_val = PF_NOFILE;
|
||||
}
|
||||
else if (st.st_size != pf->size) {
|
||||
|
||||
Reference in New Issue
Block a user