mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 23:43:26 +01:00
merge patch from issue 102
git-svn-id: http://encfs.googlecode.com/svn/trunk@69 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
parent
b20b71a97c
commit
b4f090d564
@ -80,7 +80,7 @@ void changeBase2Inline(unsigned char *src, int srcLen,
|
||||
}
|
||||
|
||||
// we have at least one value that can be output
|
||||
char outVal = work & mask;
|
||||
unsigned char outVal = work & mask;
|
||||
work >>= dst2Pow;
|
||||
workBits -= dst2Pow;
|
||||
|
||||
@ -96,8 +96,15 @@ void changeBase2Inline(unsigned char *src, int srcLen,
|
||||
*outLoc++ = outVal;
|
||||
|
||||
// we could have a partial value left in the work buffer..
|
||||
if(workBits && outputPartialLastByte)
|
||||
*outLoc = work & mask;
|
||||
if(outputPartialLastByte)
|
||||
{
|
||||
while(workBits > 0)
|
||||
{
|
||||
*outLoc++ = work & mask;
|
||||
work >>= dst2Pow;
|
||||
workBits -= dst2Pow;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user