Use one-based index in warning message

This was surfacing a zero-based counter to users which was confusing.
This commit is contained in:
Benjamin Bannier 2025-03-28 14:02:36 +01:00
parent 92d2d0c6b8
commit b1ddf9e476
2 changed files with 2 additions and 2 deletions

View file

@ -1272,7 +1272,7 @@ void Manager::ProcessMessage(std::string_view topic, broker::zeek::Event& ev) {
expected_type->GetName().c_str());
}
reporter->Warning("failed to convert remote event '%s' arg #%zu, %s", std::string{name}.c_str(), i,
reporter->Warning("failed to convert remote event '%s' arg #%zu, %s", std::string{name}.c_str(), i + 1,
msg_addl.c_str());
// If we got a vector and expected a function this is

View file

@ -1,5 +1,5 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
warning: failed to convert remote event 'ping' arg #1, got vector, expected func
warning: failed to convert remote event 'ping' arg #2, got vector, expected func
warning: when sending functions the receiver must have access to a version of that function.
For anonymous functions, that function must have the same body.
received termination signal