Skip to content

Commit 4ec40be

Browse files
authored
Merge pull request #228 from Caudiciform-Studios/bugfix/function_parameter_count
Typo in function parameter count check
2 parents 6c4e028 + ec4ea7d commit 4ec40be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/core/src/yarn_fn/function_wrapping.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ mod bevy_functions {
243243
#[allow(unused)]
244244
let input_len = input.len();
245245
let expected_len = count_tts!($($yarn_param),*);
246-
assert!(input_len != expected_len, "YarnFn expected {expected_len} arguments but received {input_len}");
246+
assert!(input_len == expected_len, "YarnFn expected {expected_len} arguments but received {input_len}");
247247
$(
248248
let $yarn_param:$yarn_param = $yarn_param::try_from(input.pop_front().unwrap()).ok().expect("Invalid argument type");
249249
)*

0 commit comments

Comments
 (0)