Skip to content

Commit 581718f

Browse files
committed
fix the bug that the compressed data can be broken.
1 parent 12006e1 commit 581718f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

wiiurpxtool.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// Copyright (C) 2016 0CBH0 <maodatou88@163.com>
2-
// Licensed under the terms of the GNU GPL, version 3
3-
// http://www.gnu.org/licenses/gpl-3.0.txt
4-
51
#include <stdio.h>
62
#include <string.h>
73
#include <stdlib.h>
@@ -331,7 +327,7 @@ int compress(FILE *in, FILE *out)
331327
{
332328
block_size = CHUNK;
333329
flush = Z_NO_FLUSH;
334-
if(data_size < block_size)
330+
if(data_size <= block_size)
335331
{
336332
block_size = data_size;
337333
flush = Z_FINISH;
@@ -388,7 +384,7 @@ int main(int argc, char *argv[])
388384
{
389385
if(argc != 3)
390386
{
391-
printf("wiiurpxtool - version:1.0\n");
387+
printf("wiiurpxtool - version:1.1\n");
392388
printf("Compress or decompress RPL/RPX files for Wii U\n\n");
393389
printf("Usage:\n");
394390
printf("decompress:\n");

0 commit comments

Comments
 (0)