Skip to content

Commit

Permalink
fix the bug that the compressed data can be broken.
Browse files Browse the repository at this point in the history
  • Loading branch information
0CBH0 committed Apr 23, 2016
1 parent 12006e1 commit 581718f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions wiiurpxtool.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright (C) 2016 0CBH0 <[email protected]>
// Licensed under the terms of the GNU GPL, version 3
// http://www.gnu.org/licenses/gpl-3.0.txt

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Expand Down Expand Up @@ -331,7 +327,7 @@ int compress(FILE *in, FILE *out)
{
block_size = CHUNK;
flush = Z_NO_FLUSH;
if(data_size < block_size)
if(data_size <= block_size)
{
block_size = data_size;
flush = Z_FINISH;
Expand Down Expand Up @@ -388,7 +384,7 @@ int main(int argc, char *argv[])
{
if(argc != 3)
{
printf("wiiurpxtool - version:1.0\n");
printf("wiiurpxtool - version:1.1\n");
printf("Compress or decompress RPL/RPX files for Wii U\n\n");
printf("Usage:\n");
printf("decompress:\n");
Expand Down

0 comments on commit 581718f

Please sign in to comment.