Problem
src/helpers/RegionMap.cpp
RegionSystem::load() tracks file read success using a success flag, but the function always returns true at the end:
file.close();
return true;
This ignores any read failures that may have occurred during loading.
Why This Is a Problem
If the file is:
Truncated
Corrupted
Partially written
load() will still report success, leading to:
Silent data corruption
Incomplete region tables
Difficult debugging of storage issues
Expected Behavior
load() should return false if any read operation fails.
Proposed Fix
Replace:
return true;
With:
return success;
Impact
Improves reliability and ensures proper error propagation when region storage fails.
I guess I need to write a pull request, right?
Problem
src/helpers/RegionMap.cpp
RegionSystem::load() tracks file read success using a success flag, but the function always returns true at the end:
file.close();
return true;
This ignores any read failures that may have occurred during loading.
Why This Is a Problem
If the file is:
Truncated
Corrupted
Partially written
load() will still report success, leading to:
Silent data corruption
Incomplete region tables
Difficult debugging of storage issues
Expected Behavior
load() should return false if any read operation fails.
Proposed Fix
Replace:
return true;
With:
return success;
Impact
Improves reliability and ensures proper error propagation when region storage fails.
I guess I need to write a pull request, right?