]> git.saurik.com Git - ldid.git/commitdiff
Allow -K argument to not specify a key (why not?).
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 13 Nov 2015 08:01:48 +0000 (00:01 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 13 Nov 2015 08:01:48 +0000 (00:01 -0800)
ldid.cpp

index 0c52fa43f13273f8940a2468289d8c783dfac72e..461433f2c3f324c15d1a606e4ec1cbdfd7ba2529 100644 (file)
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -2203,7 +2203,8 @@ int main(int argc, char *argv[]) {
             break;
 
             case 'K':
-                key.open(argv[argi] + 2, O_RDONLY, PROT_READ, MAP_PRIVATE);
+                if (argv[argi][2] != '\0')
+                    key.open(argv[argi] + 2, O_RDONLY, PROT_READ, MAP_PRIVATE);
             break;
 
 #ifndef LDID_NOFLAGT