Apparently --bps-linear doesn't like it if the last byte is unchanged, fix that

This commit is contained in:
Alcaro
2017-05-21 11:53:49 +02:00
parent 094a48b850
commit 98878bcbf1
2 changed files with 13 additions and 13 deletions

View File

@@ -284,7 +284,7 @@ enum bpserror bps_create_linear(struct mem sourcemem, struct mem targetmem, stru
{
size_t numunchanged=0;
while (source+numunchanged<sourceend && source[numunchanged]==target[numunchanged]) numunchanged++;
if (numunchanged>1)
if (numunchanged>1 || numunchanged == targetend-target)
{
//assert_shift((numunchanged-1), 2);
writenum((numunchanged-1)<<2 | 0);//SourceRead

24
make.sh
View File

@@ -38,16 +38,16 @@ profile/profile.sh ./flips
echo 'GTK+ (3/3)'
rm flips; CFLAGS=$FLAGS' -fprofile-use' make TARGET=gtk LFLAGS=''
rm *.gcda
exit #mv flips ~/bin/flips # keeping this one for myself
mv flips ~/bin/flips # keeping this one for myself
echo Finishing
#compress source
7z a floating.zip flips.exe
zipcrush floating.zip
echo Size: $(stat -c%s flips.exe)/96768
echo \(Linux: $(stat -c%s ~/bin/flips)\)
echo \(Zipped: $(stat -c%s floating.zip)/59881\)
./special.sh
rm src.zip boring.zip
#echo Finishing
##compress source
#7z a floating.zip flips.exe
#zipcrush floating.zip
#echo Size: $(stat -c%s flips.exe)/96768
#echo \(Linux: $(stat -c%s ~/bin/flips)\)
#echo \(Zipped: $(stat -c%s floating.zip)/59881\)
#
#./special.sh
#
#rm src.zip boring.zip