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));