]> git.saurik.com Git - ldid.git/commitdiff
If team ID is not specified, don't output its NUL.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 4 Sep 2016 00:39:43 +0000 (17:39 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 4 Sep 2016 00:39:43 +0000 (17:39 -0700)
ldid.cpp

index c652a90f515b05d58c76be510dc5f9a9a420c9b0..20abec9fe69ad0293abfcd79631f9c59a49d8f23 100644 (file)
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -1621,7 +1621,8 @@ std::vector<char> Sign(const void *idata, size_t isize, std::streambuf &output,
             put(data, &directory, sizeof(directory));
 
             put(data, identifier.c_str(), identifier.size() + 1);
-            put(data, team.c_str(), team.size() + 1);
+            if (!team.empty())
+                put(data, team.c_str(), team.size() + 1);
 
             uint8_t storage[special + normal][LDID_SHA1_DIGEST_LENGTH];
             uint8_t (*hashes)[LDID_SHA1_DIGEST_LENGTH] = storage + special;