mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-26 20:45:36 +08:00
fix bad calculation of file_size
This commit is contained in:
@@ -166,7 +166,7 @@ GAL_Surface * GAL_CreateSharedRGBSurface (GAL_VideoDevice *video,
|
||||
|
||||
/* rounde file size to multiple of page size */
|
||||
file_size = buf_off + buf_size;
|
||||
file_size &= ~(getpagesize () - 1);
|
||||
file_size = ROUND_TO_MULTIPLE(file_size, getpagesize ());
|
||||
buf_size = file_size - buf_off;
|
||||
|
||||
fd = __mg_create_anonymous_file (file_size, NULL, rw_modes);
|
||||
|
||||
Reference in New Issue
Block a user