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:
Valient Gough 2011-06-14 05:42:54 +00:00
parent b20b71a97c
commit b4f090d564

View File

@ -80,7 +80,7 @@ void changeBase2Inline(unsigned char *src, int srcLen,
} }
// we have at least one value that can be output // we have at least one value that can be output
char outVal = work & mask; unsigned char outVal = work & mask;
work >>= dst2Pow; work >>= dst2Pow;
workBits -= dst2Pow; workBits -= dst2Pow;
@ -96,8 +96,15 @@ void changeBase2Inline(unsigned char *src, int srcLen,
*outLoc++ = outVal; *outLoc++ = outVal;
// we could have a partial value left in the work buffer.. // we could have a partial value left in the work buffer..
if(workBits && outputPartialLastByte) if(outputPartialLastByte)
*outLoc = work & mask; {
while(workBits > 0)
{
*outLoc++ = work & mask;
work >>= dst2Pow;
workBits -= dst2Pow;
}
}
} }
} }