update code

This commit is contained in:
chiteroman 2025-01-25 12:45:43 +01:00
parent 6bb3ab20e7
commit f0c2bf6321

View File

@ -203,7 +203,8 @@ public:
if (jsonSize > 0) { if (jsonSize > 0) {
jsonStr.resize(jsonSize); jsonStr.resize(jsonSize);
xread(fd, jsonStr.data(), jsonSize); jsonSize = xread(fd, jsonStr.data(), jsonSize);
jsonStr[jsonSize] = '\0';
json = nlohmann::json::parse(jsonStr, nullptr, false, true); json = nlohmann::json::parse(jsonStr, nullptr, false, true);
} }
@ -233,7 +234,7 @@ public:
} }
void postAppSpecialize(const zygisk::AppSpecializeArgs *args) override { void postAppSpecialize(const zygisk::AppSpecializeArgs *args) override {
if (dexVector.empty()) return; if (dexVector.empty() || json.empty()) return;
UpdateBuildFields(); UpdateBuildFields();