]> pd.if.org Git - pdclib/blobdiff - functions/stdio/ftell.c
_PDCLIB_flushbuffer for win32. correct seeking behaviour.
[pdclib] / functions / stdio / ftell.c
index 27e25ee9e7f209ff247ff5a03417ef538538da5d..e82ca48155e25d22e4fcacfb2f93858e3634f6c9 100644 (file)
@@ -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