summaryrefslogtreecommitdiff
path: root/compiler/aslfiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/aslfiles.c')
-rw-r--r--compiler/aslfiles.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/aslfiles.c b/compiler/aslfiles.c
index 81bd823171c3..95e22302f060 100644
--- a/compiler/aslfiles.c
+++ b/compiler/aslfiles.c
@@ -174,14 +174,18 @@ FlGetFileSize (
{
FILE *fp;
UINT32 FileSize;
+ long Offset;
fp = Gbl_Files[FileId].Handle;
+ Offset = ftell (fp);
fseek (fp, 0, SEEK_END);
FileSize = (UINT32) ftell (fp);
- fseek (fp, 0, SEEK_SET);
+ /* Restore file pointer */
+
+ fseek (fp, Offset, SEEK_SET);
return (FileSize);
}