summaryrefslogtreecommitdiffstats
path: root/src/pblocksize.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-07-26 11:55:24 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2009-07-26 11:55:24 +0200
commit496244c64c13b071718fdc7902b01b63c5a96220 (patch)
tree11ae34766fca27303ce482eb4debaf53025a20c0 /src/pblocksize.c
parentfa3c1fe9394417744a0bec4ebd1fbfaa14009af4 (diff)
PhotoRec: When manually selecting the blocksize and offset in expert mode, fix the offset
Diffstat (limited to 'src/pblocksize.c')
-rw-r--r--src/pblocksize.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pblocksize.c b/src/pblocksize.c
index 42f98a2..02742ee 100644
--- a/src/pblocksize.c
+++ b/src/pblocksize.c
@@ -93,7 +93,8 @@ unsigned int menu_choose_blocksize(unsigned int blocksize, const unsigned int se
case '3': blocksize=32768; break;
case '6': blocksize=65536; break;
}
- if(*offset%sector_size!=0 || *offset>=blocksize)
+ *offset=*offset % blocksize;
+ if(*offset%sector_size!=0)
*offset=0;
if(sector_size < blocksize)
{