mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Add ugly check
This commit is contained in:
parent
053fbd6f27
commit
7817ba2340
@ -68,6 +68,13 @@ bool nbio_iterate(struct nbio_t* handle)
|
||||
|
||||
void nbio_resize(struct nbio_t* handle, size_t len)
|
||||
{
|
||||
if (len < handle->len)
|
||||
{
|
||||
/* this works perfectly fine if this check is removed, but it won't work on other nbio implementations */
|
||||
/* therefore, it's blocked so nobody accidentally relies on it */
|
||||
puts("ERROR - attempted file shrink operation, not implemented");
|
||||
abort();
|
||||
}
|
||||
if (ftruncate(handle->fd, len) != 0)
|
||||
{
|
||||
puts("ERROR - couldn't resize file (ftruncate)");
|
||||
|
Loading…
x
Reference in New Issue
Block a user