X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdio%2Fftell.c;h=e82ca48155e25d22e4fcacfb2f93858e3634f6c9;hp=27e25ee9e7f209ff247ff5a03417ef538538da5d;hb=04ff9a4a124eaa87d5d26d90077fb4ed15f3277f;hpb=9b38723dad57f9eb49abdb2a6cde699c658c83fc diff --git a/functions/stdio/ftell.c b/functions/stdio/ftell.c index 27e25ee..e82ca48 100644 --- a/functions/stdio/ftell.c +++ b/functions/stdio/ftell.c @@ -38,7 +38,8 @@ long int ftell( struct _PDCLIB_file_t * stream ) _PDCLIB_errno = _PDCLIB_ERANGE; return -1; } - return (long int)( stream->pos.offset - ( ( (int)stream->bufend - (int)stream->bufidx ) + stream->ungetidx ) ); + long int res = ( stream->pos.offset - ( ( (int)stream->bufend - (int)stream->bufidx ) + stream->ungetidx ) ); + return res; } #endif