-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix the bug that the compressed data can be broken.
- Loading branch information
Showing
1 changed file
with
2 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
@@ -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; | ||
|
@@ -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"); | ||
|