howardjack / distorm

Automatically exported from code.google.com/p/distorm
GNU General Public License v3.0
0 stars 0 forks source link

The 'offset' parameter of "CSample" is no effect #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
whatever  i set the 'offset' parameter, the 'CSample' always decodes a file 
from the begining.
i add fseek and reset the 'filesize' according to the 'offset' before reading 
the file, it woks.

127a128,129
>                 fseek(f, offset, SEEK_SET);
>                 filesize -= offset;

Original issue reported on code.google.com by Hke...@gmail.com on 22 May 2013 at 3:17

GoogleCodeExporter commented 9 years ago
This is not a bug.
The offset is a 'virtual address' of the code in memory.

Original comment by distorm@gmail.com on 22 Jun 2013 at 8:53