From 627fee23d19699660887fee373c6d4b74dba81cc Mon Sep 17 00:00:00 2001 From: Carter Li Date: Thu, 26 Feb 2026 09:00:24 +0800 Subject: [PATCH] Chore: adds assertions --- src/common/impl/percent.c | 2 ++ src/common/impl/temps.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/common/impl/percent.c b/src/common/impl/percent.c index 1ab0c1e57..a367bce57 100644 --- a/src/common/impl/percent.c +++ b/src/common/impl/percent.c @@ -261,6 +261,8 @@ bool ffPercentParseCommandOptions(const char* key, const char* subkey, const cha bool ffPercentParseJsonObject(yyjson_val* key, yyjson_val* value, FFPercentageModuleConfig* config) { + assert(key); + if (!unsafe_yyjson_equals_str(key, "percent")) return false; diff --git a/src/common/impl/temps.c b/src/common/impl/temps.c index c3c6f47f3..29d705aa4 100644 --- a/src/common/impl/temps.c +++ b/src/common/impl/temps.c @@ -109,6 +109,8 @@ bool ffTempsParseCommandOptions(const char* key, const char* subkey, const char* bool ffTempsParseJsonObject(yyjson_val* key, yyjson_val* value, bool* useTemp, FFColorRangeConfig* config) { + assert(key); + if (!unsafe_yyjson_equals_str(key, "temp")) return false;