From 75939047d14a43b1aadae07f0139969d7b54dfdd Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 23 Feb 2019 04:34:33 -0500 Subject: [PATCH] Fix bugs in compression --- native/jni/magiskboot/compress.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/jni/magiskboot/compress.cpp b/native/jni/magiskboot/compress.cpp index e78d99e9a..8779c663a 100644 --- a/native/jni/magiskboot/compress.cpp +++ b/native/jni/magiskboot/compress.cpp @@ -109,7 +109,7 @@ void compress(const char *method, const char *infile, const char *outfile) { rm_in = true; } } else { - out_fd = strcmp(infile, "-") == 0 ? STDOUT_FILENO : creat(infile, 0644); + out_fd = strcmp(outfile, "-") == 0 ? STDOUT_FILENO : creat(outfile, 0644); } cmp->set_out(make_unique(out_fd));