Fixed allocation math and make sure we return the right buffer
Fixed allocation math and make sure we return the right buffer

git-svn-id: 5d97f941163d266b87bda8434345d407956d0761@642 96dfbd92-d197-e211-9ca9-00110a534b34

RyuKojiro/v6502